11#include <initializer_list>
17 template <
int Size,
typename Scalar>
struct Vector;
36 template <
typename NewScalarType,
int Size,
typename Scalar>
38 const tarch::la::Vector<Size, Scalar>& vector
48template <
int Size,
typename Scalar>
200 inline
Vector<Size, Scalar>& operator=(const
Vector<Size, Scalar>& toAssign) {
202 for (
int i = 0; i < Size; i++) {
203 _values[i] = toAssign._values[i];
240#if defined(GPUOffloadingOff)
247 "you may not take the indexth entry from a vector with only Size components"
259#if defined(GPUOffloadingOff)
278#if defined(GPUOffloadingOff)
291#if defined(GPUOffloadingOff)
#define assertion4(expr, param0, param1, param2, param3)
#define assertion3(expr, param0, param1, param2)
std::string toString(const tarch::la::Vector< Size, Scalar > &vector)
Pipes the elements of a vector into a std::string and returns the string.
My collection of tiny vector operations.
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)
Scalar & operator[](int index) InlineMethod
Returns ref.
int size() const
Returns the number of components of the vector.
Scalar & operator()(int index) InlineMethod
Returns ref.
const Scalar * data() const
const Scalar & operator()(int index) const InlineMethod
Returns read-only ref.
Scalar * data()
This routine returns a pointer to the first data element.
const Scalar & operator[](int index) const InlineMethod
Returns read-only ref.
Vector() InlineMethod=default
Clang requires the always_inline attribute, as it otherwise makes weird decisions.
Vector(const Vector< Size, Scalar > &toCopy) InlineMethod=default
Copy constructor to copy from any vector type.
#define InlineMethod
Generic identifier for inlined functions.