43template<
class ThrustVector >
46 using iterator = std::conditional_t<std::is_const<ThrustVector>::value,
47 typename ThrustVector::const_iterator,
48 typename ThrustVector::iterator>;
50 using pointer = std::conditional_t<std::is_const<ThrustVector>::value,
51 typename ThrustVector::const_pointer,
52 typename ThrustVector::pointer>;
55 View(
void): m_ptr(), m_size(0){}
63 template<
class OtherView>
67 template<
class InputIterator>
79 template<
class InputIterator>
134 std::swap( m_ptr, src.m_ptr);
135 std::swap( m_size, src.m_size);
146template<
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:149
get_execution_policy< ThrustVector > execution_policy
Definition view.h:151
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
std::conditional_t< std::is_const< ThrustVector >::value, typename ThrustVector::const_iterator, typename ThrustVector::iterator > iterator
Definition view.h:46
View(OtherView &src)
Construct from another View or Vector.
Definition view.h:64
unsigned size() const
Get the size.
Definition view.h:125
typename ThrustVector::const_iterator const_iterator
Definition view.h:49
iterator end() const
Iterator to the end.
Definition view.h:111
View(void)
Initialize empty view.
Definition view.h:55
void swap(View &src)
Swap pointer and size with another View.
Definition view.h:133
const_iterator cbegin() const
const Iterator to the beginning
Definition view.h:104
pointer data() const
Constant Reference of the pointer.
Definition view.h:90
iterator begin() const
Iterator to the beginning.
Definition view.h:97
void construct(InputIterator data, unsigned size)
Construct view from pointer and size.
Definition view.h:80
const_iterator cend() const
const Iterator to the end
Definition view.h:118
View(InputIterator data, unsigned size)
Construct view from pointer and size.
Definition view.h:68
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