47#define GridVector_CopyTraits \
48 using element = vtype; \
49 using scalar_type = typename Traits::scalar_type; \
50 using vector_type = typename Traits::vector_type; \
51 using scalar_typeD = typename Traits::scalar_typeD; \
52 using vector_typeD = typename Traits::vector_typeD; \
53 using tensor_reduced = typename Traits::tensor_reduced; \
54 using scalar_object = typename Traits::scalar_object; \
55 using scalar_objectD = typename Traits::scalar_objectD; \
56 using Complexified = typename Traits::Complexified; \
57 using Realified = typename Traits::Realified; \
58 using DoublePrecision = typename Traits::DoublePrecision; \
59 using DoublePrecision2= typename Traits::DoublePrecision2; \
60 static constexpr int TensorLevel = Traits::TensorLevel
98 zeroit(*
this);
return *
this;
144 template <
class U = vtype,
class V = scalar_type, IfComplex<V> = 0, IfNotSimd<U> = 0>
accelerator_inline
148 template <
class U = vtype,
class V = scalar_type, IfComplex<V> = 0, IfNotSimd<U> = 0>
accelerator_inline
153 template <
class U = vtype,
class V = scalar_type, IfReal<V> = 0,IfNotSimd<U> = 0>
accelerator_inline
157 template <
class U = vtype,
class V = scalar_type, IfInteger<V> = 0, IfNotSimd<U> = 0>
accelerator_inline
163 template <class T, typename std::enable_if<!isGridTensor<T>::value, T>
::type * =
nullptr>
170 template <
class ttype>
188template <
class vtype,
int N>
199 template <class T, typename std::enable_if<!isGridTensor<T>::value, T>
::type * =
nullptr>
202 for (
int i = 0; i < N; i++)
_internal[i] = arg;
209 template<
class other>
212 for (
int i = 0; i < N; i++) {
222 for (
int i = 0; i < N; i++) {
230 for (
int i = 0; i < N; i++) {
235 for(
int i=0;i<N;i++){
240 for(
int i=0;i<N;i++){
245 for(
int i=0;i<N;i++){
251 for(
int i=0;i<N;i++){
280 stream <<
"V<" << N <<
">{";
281 for (
int i = 0; i < N; i++) {
283 if (i < N - 1) stream <<
",";
300template <
class vtype,
int N>
315 template<
class other>
317 for (
int i = 0; i < N; i++)
318 for (
int j = 0; j < N; j++)
331 template <class T, typename std::enable_if<!isGridTensor<T>::value, T>
::type * =
nullptr>
334 for (
int i = 0; i < N; i++)
_internal[i][i] = arg;
339 for(
int i=0;i<N;i++){
340 for(
int j=0;j<N;j++){
345 for(
int i=0;i<N;i++) {
346 for(
int j=0;j<N;j++) {
351 for(
int i=0;i<N;i++){
352 for(
int j=0;j<N;j++){
357 for(
int i=0;i<N;i++){
358 for(
int j=0;j<N;j++){
364 for(
int i=0;i<N;i++){
365 for(
int j=0;j<N;j++){
370 for(
int i=0;i<N;i++){
371 for(
int j=0;j<N;j++){
377 for(
int i=0;i<N;i++){
378 for(
int j=0;j<N;j++){
386 for (
int i = 0; i < N; i++) {
387 for (
int j = 0; j < N; j++) {
417 stream <<
"M<" << N <<
">{";
418 for (
int i = 0; i < N; i++) {
420 for (
int j = 0; j < N; j++) {
422 if (j < N - 1) stream <<
",";
425 if (i != N - 1) stream <<
"\n\t\t";
448 for (
int i = 0; i < N; i++) {
454 for (
int i = 0; i < N; i++) {
455 for (
int j = 0; j < N; j++) {
465template<
class vec>
struct sycl::is_device_copyable<
Grid::
iScalar<vec> > :
public std::true_type {};
466template<
class vec,
int N>
struct sycl::is_device_copyable<
Grid::
iVector<vec,N> > :
public std::true_type {};
467template<
class vec,
int N>
struct sycl::is_device_copyable<
Grid::
iMatrix<vec,N> > :
public std::true_type {};
#define accelerator_inline
#define NAMESPACE_BEGIN(A)
std::complex< RealF > ComplexF
std::complex< RealD > ComplexD
accelerator_inline std::enable_if<!isGridTensor< T >::value, T >::type TensorRemove(T arg)
accelerator_inline void vprefetch(const iScalar< v > &vv)
accelerator_inline const vtype & operator()(int i, int j) const
friend accelerator_inline void prefetch(iMatrix< vtype, N > &that)
accelerator_inline iMatrix(scalar_type s)
friend accelerator_inline iMatrix< vtype, N > operator-(const iMatrix< vtype, N > &r)
friend std::ostream & operator<<(std::ostream &stream, const iMatrix< vtype, N > &o)
accelerator_inline auto operator=(T arg) -> iMatrix< vtype, N >
friend accelerator_inline void permute(iMatrix< vtype, N > &out, const iMatrix< vtype, N > &in, int permutetype)
friend accelerator_inline void vbroadcast(iMatrix< vtype, N > &out, const iMatrix< vtype, N > &in, int lane)
strong_inline scalar_type * begin()
GridTypeMapper< iMatrix< CComplex, N > > Traits
friend accelerator_inline void zeroit(iMatrix< vtype, N > &that)
accelerator_inline vtype & operator()(int i, int j)
friend accelerator_inline void vstream(iMatrix< vtype, N > &out, const iMatrix< vtype, N > &in)
strong_inline const scalar_type * end() const
static accelerator_inline constexpr int Nsimd(void)
friend accelerator_inline void rotate(iMatrix< vtype, N > &out, const iMatrix< vtype, N > &in, int rot)
accelerator_inline iMatrix< vtype, N > & operator-=(const T &r)
accelerator_inline iMatrix(const Zero &z)
accelerator_inline iMatrix & operator=(const iMatrix< other, N > &rhs)
strong_inline scalar_type * end()
friend accelerator_inline void exchange(iMatrix< vtype, N > &out1, iMatrix< vtype, N > &out2, const iMatrix< vtype, N > &in1, const iMatrix< vtype, N > &in2, int type)
accelerator_inline iMatrix< vtype, N > & operator=(const Zero &hero)
accelerator_inline iMatrix< vtype, N > & operator+=(const T &r)
accelerator_inline iMatrix< vtype, N > & operator*=(const T &r)
accelerator iMatrix()=default
strong_inline const scalar_type * begin() const
friend accelerator_inline void vbroadcast(iScalar< vtype > &out, const iScalar< vtype > &in, int lane)
accelerator_inline iScalar< vtype > & operator+=(const iScalar< vtype > &r)
friend accelerator_inline void vstream(iScalar< vtype > &out, const iScalar< vtype > &in)
accelerator_inline iScalar< vtype > & operator-=(const iScalar< vtype > &r)
static accelerator_inline constexpr int Nsimd(void)
accelerator_inline iScalar(scalar_type s)
friend accelerator_inline void rotate(iScalar< vtype > &out, const iScalar< vtype > &in, int rot)
GridTypeMapper< iScalar< vInteger > > Traits
accelerator_inline iScalar< vtype > operator=(T arg)
friend accelerator_inline iScalar< vtype > operator-(const iScalar< vtype > &r)
accelerator_inline iScalar< vtype > operator=(const iScalar< ttype > &arg)
friend accelerator_inline void zeroit(iScalar< vtype > &that)
accelerator_inline const vtype & operator()(void) const
friend accelerator_inline void permute(iScalar< vtype > &out, const iScalar< vtype > &in, int permutetype)
strong_inline const scalar_type * end() const
friend accelerator_inline void exchange(iScalar< vtype > &out1, iScalar< vtype > &out2, const iScalar< vtype > &in1, const iScalar< vtype > &in2, int type)
accelerator iScalar()=default
friend accelerator_inline void prefetch(iScalar< vtype > &that)
strong_inline scalar_type * begin()
accelerator_inline iScalar< vtype > & operator*=(const iScalar< vtype > &r)
accelerator_inline vtype & operator()(void)
strong_inline scalar_type * end()
accelerator_inline iScalar< vtype > & operator=(const Zero &hero)
strong_inline const scalar_type * begin() const
accelerator_inline iScalar(const Zero &z)
friend std::ostream & operator<<(std::ostream &stream, const iScalar< vtype > &o)
friend accelerator_inline void exchange(iVector< vtype, N > &out1, iVector< vtype, N > &out2, const iVector< vtype, N > &in1, const iVector< vtype, N > &in2, int type)
friend accelerator_inline void vstream(iVector< vtype, N > &out, const iVector< vtype, N > &in)
friend accelerator_inline void prefetch(iVector< vtype, N > &that)
friend accelerator_inline void permute(iVector< vtype, N > &out, const iVector< vtype, N > &in, int permutetype)
accelerator_inline iVector< vtype, N > & operator*=(const iScalar< vtype > &r)
strong_inline scalar_type * begin()
accelerator_inline iVector(const Zero &z)
strong_inline scalar_type * end()
GridTypeMapper< iVector< CComplex, N > > Traits
strong_inline const scalar_type * begin() const
friend accelerator_inline void rotate(iVector< vtype, N > &out, const iVector< vtype, N > &in, int rot)
accelerator_inline iVector< vtype, N > & operator=(const Zero &hero)
friend accelerator_inline iVector< vtype, N > operator-(const iVector< vtype, N > &r)
friend accelerator_inline void zeroit(iVector< vtype, N > &that)
friend accelerator_inline void vbroadcast(iVector< vtype, N > &out, const iVector< vtype, N > &in, int lane)
accelerator_inline auto operator=(T arg) -> iVector< vtype, N >
accelerator_inline iVector< vtype, N > & operator=(const iVector< other, N > &him)
static accelerator_inline constexpr int Nsimd(void)
accelerator_inline vtype & operator()(int i)
strong_inline const scalar_type * end() const
accelerator_inline const vtype & operator()(int i) const
friend std::ostream & operator<<(std::ostream &stream, const iVector< vtype, N > &o)
accelerator_inline iVector< vtype, N > & operator-=(const iVector< vtype, N > &r)
accelerator_inline iVector< vtype, N > & operator+=(const iVector< vtype, N > &r)
accelerator iVector()=default