Tensor
A C++ expression template library for computations on N dimensional tensors
tensor.hpp
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------------------------------------
2 /// @file Header file for tensor interface for tensor library.
3 // ----------------------------------------------------------------------------------------------------------
4 
5 /*
6  * ----------------------------------------------------------------------------------------------------------
7  * Tensor is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published
9  * by the Free Software Foundation; either version 2 of the License, or
10  * (at your option) any later version.
11  *
12  * Tensor is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License along
18  * with tensor; if not, write to the Free Software Foundation,
19  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20  * ----------------------------------------------------------------------------------------------------------
21  */
22 
23 #ifndef FTL_TENSOR_HPP
24 #define FTL_TENSOR_HPP
25 
26 //#include "tensor_expressions.hpp"
27 #include "tensor_dynamic_cpu.hpp"
28 #include "tensor_static_cpu.hpp"
29 
30 namespace ftl {
31 
32 // Define a type alias for a general tensor that will 'choose' the specialization
33 template <typename Dtype, device DeviceType, size_t... DimSizes>
34 using Tensor = TensorInterface<TensorTraits<Dtype, DeviceType, DimSizes...>>;
35 
36 } // End namespace ftl
37 #endif // FTL_TENSOR_INTERFACE_HPP
Definition: tensor_dynamic_cpu.hpp:44
Definition: mapper.hpp:37
short device
Definition: tensor_traits.hpp:32
Traits class which specifies parameters for a tensor, such as what type of container it uses and what...
Definition: tensor_traits.hpp:48