43template<
class ThrustVector >
50 using pointer = std::conditional_t<std::is_const<ThrustVector>::value,
51 typename ThrustVector::const_pointer,
52 typename ThrustVector::pointer>;
57 View(
void): m_ptr(), m_size(0){}
65 template<
class OtherView>
69 template<
class InputIterator>
81 template<
class InputIterator>
136 std::swap( m_ptr, src.m_ptr);
137 std::swap( m_size, src.m_size);
148template<
class ThrustVector>
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...
get_value_type< ThrustVector > value_type
Definition view.h:151
get_execution_policy< ThrustVector > execution_policy
Definition view.h:153
The vector traits.
Definition tensor_traits.h:38
Indicate thrust/std - like behaviour.
Definition vector_categories.h:88
A vector view class, usable in dg functions.
Definition view.h:45
View(OtherView &src)
Construct from another View or Vector.
Definition view.h:66
const_pointer const_iterator
Definition view.h:55
unsigned size() const
Get the size.
Definition view.h:127
iterator end() const
Iterator to the end.
Definition view.h:113
View(void)
Initialize empty view.
Definition view.h:57
void swap(View &src)
Swap pointer and size with another View.
Definition view.h:135
const_iterator cbegin() const
const Iterator to the beginning
Definition view.h:106
pointer data() const
Constant Reference of the pointer.
Definition view.h:92
iterator begin() const
Iterator to the beginning.
Definition view.h:99
void construct(InputIterator data, unsigned size)
Construct view from pointer and size.
Definition view.h:82
const_iterator cend() const
const Iterator to the end
Definition view.h:120
View(InputIterator data, unsigned size)
Construct view from pointer and size.
Definition view.h:70
typename ThrustVector::const_pointer const_pointer
Definition view.h:53
std::conditional_t< std::is_const< ThrustVector >::value, typename ThrustVector::const_pointer, typename ThrustVector::pointer > pointer
Definition view.h:50
pointer iterator
Definition view.h:54