Discontinuous Galerkin Library
#include "dg/algorithm.h"
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 "vector_categories.h"
7#include "tensor_traits.h"
8
9namespace dg
10{
13
15template<class T>
16struct TensorTraits<std::vector<T>,
17 std::enable_if_t< !std::is_arithmetic<T>::value>>
18{
22};
23template<class T>
24struct TensorTraits<std::vector<T>,
25 std::enable_if_t< std::is_arithmetic<T>::value>>
26{
27 using value_type = T;
30};
31
32template<class T, std::size_t N>
33struct TensorTraits<std::array<T, N>,
34 std::enable_if_t< !std::is_arithmetic<T>::value>>
35{
39};
40
41template<class T, std::size_t N>
42struct TensorTraits<std::array<T, N>,
43 std::enable_if_t< std::is_arithmetic<T>::value>>
44{
45 using value_type = T;
48};
49
51template<class Key, class T>
52struct TensorTraits<std::map<Key,T>>
53{
57};
59} //namespace dg
typename TensorTraits< std::decay_t< Vector > >::value_type get_value_type
Definition: tensor_traits.h:38
typename TensorTraits< std::decay_t< Vector > >::execution_policy get_execution_policy
Definition: tensor_traits.h:42
This is the namespace for all functions and classes defined and used by the discontinuous Galerkin li...
Definition: vector_categories.h:67
Definition: vector_categories.h:64
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:38
get_value_type< T > value_type
Definition: tensor_traits_std.h:54
get_execution_policy< T > execution_policy
Definition: tensor_traits_std.h:56
get_execution_policy< T > execution_policy
Definition: tensor_traits_std.h:21
The vector traits.
Definition: tensor_traits.h:31
Indicate thrust/std - like behaviour.
Definition: vector_categories.h:88