Discontinuous Galerkin Library
#include "dg/algorithm.h"
Loading...
Searching...
No Matches
tensor_traits_std.h
Go to the documentation of this file.
1#pragma once
2
3#include <array>
4#include <vector>
5#include <map>
6#include <complex>
7
8#include "vector_categories.h"
9#include "tensor_traits.h"
11#include "predicate.h"
12
13namespace dg
14{
17
19template<class T>
20struct TensorTraits<std::vector<T>,
21 std::enable_if_t< !dg::is_scalar<T>::value>>
22{
26};
27template<class T>
28struct TensorTraits<std::vector<T>,
29 std::enable_if_t< dg::is_scalar<T>::value>>
30{
31 using value_type = T;
34};
35
36template<class T, std::size_t N>
37struct TensorTraits<std::array<T, N>,
38 std::enable_if_t< !dg::is_scalar<T>::value>>
39{
43};
44
45template<class T, std::size_t N>
46struct TensorTraits<std::array<T, N>,
47 std::enable_if_t< dg::is_scalar<T>::value>>
48{
49 using value_type = T;
52};
53
55template<class Key, class T>
62
64template<class T>
65struct TensorTraits<std::complex<T>>
66{
67 using value_type = std::complex<T>;
70};
72} //namespace dg
typename TensorTraits< std::decay_t< Vector > >::execution_policy get_execution_policy
Definition tensor_traits.h:49
typename TensorTraits< std::decay_t< Vector > >::value_type get_value_type
Definition tensor_traits.h:45
This is the namespace for all functions and classes defined and used by the discontinuous Galerkin li...
Execution Policy base class.
Definition execution_policy.h:18
Definition vector_categories.h:67
Definition vector_categories.h:64
complex number type
Definition scalar_categories.h:21
This tag indicates composition/recursion.
Definition vector_categories.h:62
Indicate sequential execution.
Definition execution_policy.h:26
Definition vector_categories.h:65
get_execution_policy< T > execution_policy
Definition tensor_traits_std.h:42
std::complex< T > value_type
Definition tensor_traits_std.h:67
get_value_type< T > value_type
Definition tensor_traits_std.h:58
get_execution_policy< T > execution_policy
Definition tensor_traits_std.h:60
get_execution_policy< T > execution_policy
Definition tensor_traits_std.h:25
The vector traits.
Definition tensor_traits.h:38
Indicate thrust/std - like behaviour.
Definition vector_categories.h:88