56 #if __cplusplus > 199711L || WIN32 57 std::vector<T> toStdVector() {
62 return std::vector<T>({ x});
158 template<
class T,
class S>
__device__ __host__ vec1< T > operator-(const vec1< T > &a, const vec1< T > &b)
Definition: vec1.hpp:140
__device__ __host__ T & operator[](size_t i)
Definition: vec1.hpp:84
__device__ __host__ vec1< T > operator*(T scalar, const vec1< T > &a)
Definition: vec1.hpp:131
#define __host__
Definition: types.hpp:46
__device__ __host__ vec1< S > convert() const
Definition: vec1.hpp:69
__device__ __host__ vec1< T > operator+(const vec1< T > &a, const vec1< S > &b)
Definition: vec1.hpp:159
Various utilities for mpi and cuda.
Definition: Factory.hpp:3
__device__ static __host__ constexpr size_t size()
Definition: vec1.hpp:99
__device__ __host__ vec1(T x)
Definition: vec1.hpp:31
__device__ __host__ const T & operator[](size_t i) const
Definition: vec1.hpp:76
#define __device__
Definition: types.hpp:45
T x
Definition: vec1.hpp:25
__device__ __host__ vec1 & operator=(const vec1< S > &other)
Definition: vec1.hpp:47
__device__ __host__ vec1< T > operator/(const vec1< T > &a, const vec1< T > &b)
Definition: vec1.hpp:121
__device__ __host__ T dot(const vec1< T > &other) const
Definition: vec1.hpp:92
__device__ __host__ vec1()
Definition: vec1.hpp:27
__device__ __host__ vec1(const vec1< T &> &other)
Definition: vec1.hpp:40
__device__ __host__ vec1< T > & operator+=(const vec1< S > &b)
Definition: vec1.hpp:108
__device__ __host__ bool operator==(const vec1 &other) const
Definition: vec1.hpp:53
__device__ __host__ T norm() const
Definition: vec1.hpp:103