Tatooine
tensor_type_operations.h
Go to the documentation of this file.
1#ifndef TATOOINE_TENSOR_TYPE_OPERATIONS_H
2#define TATOOINE_TENSOR_TYPE_OPERATIONS_H
3//==============================================================================
6//==============================================================================
7namespace tatooine {
8//==============================================================================
9template <std::size_t NewRightDim, typename Tensor>
11// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
12template <std::size_t NewRightDim, typename Tensor>
15// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
16template <std::size_t NewRightDim, typename Real, std::size_t... Dims>
17struct tensor_add_dimension_right_impl<NewRightDim, tensor<Real, Dims...>> {
18 using type = tensor<Real, Dims..., NewRightDim>;
19};
20template <std::size_t NewRightDim, typename Real, std::size_t M, std::size_t N>
21struct tensor_add_dimension_right_impl<NewRightDim, mat<Real, M, N>> {
23};
24template <std::size_t NewRightDim, typename Real, std::size_t N>
25struct tensor_add_dimension_right_impl<NewRightDim, vec<Real, N>> {
27};
28template <std::size_t NewRightDim>
29struct tensor_add_dimension_right_impl<NewRightDim, long double> {
31};
32template <std::size_t NewRightDim>
35};
36template <std::size_t NewRightDim>
37struct tensor_add_dimension_right_impl<NewRightDim, float> {
39};
40//==============================================================================
41template <std::size_t NewLeftDim, typename Tensor>
43// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
44template <std::size_t NewLeftDim, typename Tensor>
47// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
48template <std::size_t NewLeftDim, typename Real, std::size_t... Dims>
49struct tensor_add_dimension_left_impl<NewLeftDim, tensor<Real, Dims...>> {
50 using type = tensor<Real, NewLeftDim, Dims...>;
51};
52template <std::size_t NewLeftDim, typename Real, std::size_t M, std::size_t N>
53struct tensor_add_dimension_left_impl<NewLeftDim, mat<Real, M, N>> {
55};
56template <std::size_t NewLeftDim, typename Real, std::size_t N>
57struct tensor_add_dimension_left_impl<NewLeftDim, vec<Real, N>> {
59};
60template <std::size_t NewLeftDim>
61struct tensor_add_dimension_left_impl<NewLeftDim, long double> {
63};
64template <std::size_t NewLeftDim>
67};
68template <std::size_t NewLeftDim>
69struct tensor_add_dimension_left_impl<NewLeftDim, float> {
71};
72//==============================================================================
73} // namespace tatooine
74//==============================================================================
75#endif
Definition: algorithm.h:6
typename tensor_add_dimension_left_impl< NewLeftDim, Tensor >::type tensor_add_dimension_left
Definition: tensor_type_operations.h:46
typename tensor_add_dimension_right_impl< NewRightDim, Tensor >::type tensor_add_dimension_right
Definition: tensor_type_operations.h:14
T type
Definition: common_type.h:13
Definition: mat.h:14
Definition: tensor_type_operations.h:42
Definition: tensor_type_operations.h:10
Definition: tensor.h:17
Definition: vec.h:12