14#include <initializer_list>
18 template <
int Size,
typename Scalar>
19 struct SmartPointerVector;
21 template <
int Size,
typename Scalar>
24 template <
typename NewScalarType,
int Size,
typename Scalar>
34template<
int Size,
typename Scalar>
46template <
int Size,
typename Scalar>
156#if defined(GPUOffloadingOff)
158 assertion4 ( index < Size, index, Size,
::toString(*
this),
"you may not take the indexth entry from a SmartPointerVector with only Size components" );
169#if defined(GPUOffloadingOff)
188#if defined(GPUOffloadingOff)
201#if defined(GPUOffloadingOff)
224#include "tarch/la/SmartPointerVector.cpph"
#define assertion4(expr, param0, param1, param2, param3)
#define assertion3(expr, param0, param1, param2)
std::string toString(const tarch::la::SmartPointerVector< Size, Scalar > &smartPointerVector)
Pipes the elements of a SmartPointerVector into a std::string and returns the string.
tarch::la::SmartPointerVector< Size, NewScalarType > convertScalar(const tarch::la::SmartPointerVector< Size, Scalar > &SmartPointerVector)
Have to include this header, as I need access to the SYCL_EXTERNAL keyword.
std::string toString(MemoryLocation value)
Simple SmartPointerVector class.
int size() const
Returns the number of components of the SmartPointerVector.
SmartPointerVector() InlineMethod
Clang requires the always_inline attribute, as it otherwise makes weird decisions.
Scalar * _values
In the original vector, this is.
Scalar * data()
This routine returns a pointer to the first data element.
const Scalar & operator()(int index) const InlineMethod
Returns read-only ref.
std::shared_ptr< Scalar[] > _dataSmartPointer
Vector< Size, Scalar > toVector() const
const Scalar & operator[](int index) const InlineMethod
Returns read-only ref.
const Scalar * data() const
#define InlineMethod
Generic identifier for inlined functions.