tiledarray_fwd.h
Go to the documentation of this file.
1 /*
2  * This file is a part of TiledArray.
3  * Copyright (C) 2014 Virginia Tech
4  *
5  * This program is free software: you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation, either version 3 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program. If not, see <http://www.gnu.org/licenses/>.
17  *
18  */
19 
20 #ifndef TILEDARRAY_FWD_H__INCLUDED
21 #define TILEDARRAY_FWD_H__INCLUDED
22 
23 #include <complex>
24 
25 #include <btas/fwd.h>
26 
27 #include <TiledArray/config.h>
28 
29 namespace Eigen { // fwd define Eigen's aligned allocator for
30  // TiledArray::Tensor
31 template <class>
32 class aligned_allocator;
33 } // namespace Eigen
34 
35 namespace TiledArray {
36 
37 // Ranges
38 class Range;
39 class TiledRange1;
40 class TiledRange;
41 
42 // TiledArray Policy
43 class DensePolicy;
44 class SparsePolicy;
45 
46 // TiledArray Tensors
47 template <typename, typename>
48 class Tensor;
49 
60 
61 // CUDA tensor
62 #ifdef TILEDARRAY_HAS_CUDA
63 
64 template <class T>
65 class cuda_um_allocator_impl;
66 
67 template <typename T, typename A = std::allocator<T>>
68 class default_init_allocator;
69 
70 template <typename T>
71 using cuda_um_allocator = default_init_allocator<T, cuda_um_allocator_impl<T>>;
72 
75 template <typename T>
76 using cuda_um_btas_varray = ::btas::varray<T, TiledArray::cuda_um_allocator<T>>;
77 
81 template <typename T, typename Range = TiledArray::Range>
82 using btasUMTensorVarray =
83  ::btas::Tensor<T, Range, TiledArray::cuda_um_btas_varray<T>>;
84 
85 #endif
86 
87 // TiledArray Arrays
88 template <typename, typename>
89 class DistArray;
90 
91 // Dense Array Typedefs
92 template <typename T>
100 
101 // Sparse Array Typedefs
102 template <typename T>
103 using TSpArray =
111 
112 // type alias for backward compatibility: the old Array has static type,
113 // DistArray is rank-polymorphic
114 template <typename T, unsigned int = 0,
116  typename Policy = DensePolicy>
118 
119 } // namespace TiledArray
120 
121 #ifndef TILEDARRAY_DISABLE_NAMESPACE_TA
122 namespace TA = TiledArray;
123 #endif // TILEDARRAY_DISABLE_NAMESPACE_TA
124 
125 #endif // TILEDARRAY_FWD_H__INCLUDED
Forward declarations.
Definition: foreach.h:34
TArray< std::complex< float > > TArrayC
TArray< double > TArrayD
Tensor< double, Eigen::aligned_allocator< double > > TensorD
Tensor< float, Eigen::aligned_allocator< float > > TensorF
TSpArray< double > TSpArrayD
TArray< long > TArrayL
TSpArray< std::complex< double > > TSpArrayZ
TArray< int > TArrayI
TArray< std::complex< double > > TArrayZ
Tensor< std::complex< double >, Eigen::aligned_allocator< std::complex< double > > > TensorZ
Forward declarations.
Definition: dist_array.h:57
TSpArray< float > TSpArrayF
TSpArray< std::complex< float > > TSpArrayC
TSpArray< long > TSpArrayL
Tensor< int, Eigen::aligned_allocator< int > > TensorI
An N-dimensional tensor object.
Definition: tensor.h:50
Tensor< long, Eigen::aligned_allocator< long > > TensorL
TSpArray< int > TSpArrayI
Tensor< std::complex< float >, Eigen::aligned_allocator< std::complex< float > > > TensorC
An N-dimensional shallow copy wrapper for tile objects.
Definition: tile.h:82
TArray< float > TArrayF