mirror of
https://github.com/paboyle/Grid.git
synced 2025-04-25 13:15:55 +01:00
Nsimd() and coalesced support
This commit is contained in:
parent
d8098f1ecd
commit
ffde81f22a
@ -64,6 +64,8 @@ public:
|
|||||||
|
|
||||||
enum { TensorLevel = GridTypeMapper<vtype>::TensorLevel + 1 };
|
enum { TensorLevel = GridTypeMapper<vtype>::TensorLevel + 1 };
|
||||||
|
|
||||||
|
static constexpr accelerator_inline int Nsimd(void) { return sizeof(vector_type)/sizeof(scalar_type); }
|
||||||
|
|
||||||
// Scalar no action
|
// Scalar no action
|
||||||
accelerator iScalar() = default;
|
accelerator iScalar() = default;
|
||||||
|
|
||||||
@ -195,6 +197,8 @@ public:
|
|||||||
// get double precision version
|
// get double precision version
|
||||||
typedef iVector<typename GridTypeMapper<vtype>::DoublePrecision, N> DoublePrecision;
|
typedef iVector<typename GridTypeMapper<vtype>::DoublePrecision, N> DoublePrecision;
|
||||||
|
|
||||||
|
static constexpr accelerator_inline int Nsimd(void) { return sizeof(vector_type)/sizeof(scalar_type); }
|
||||||
|
|
||||||
template <class T, typename std::enable_if<!isGridTensor<T>::value, T>::type * = nullptr>
|
template <class T, typename std::enable_if<!isGridTensor<T>::value, T>::type * = nullptr>
|
||||||
accelerator_inline auto operator=(T arg) -> iVector<vtype, N> {
|
accelerator_inline auto operator=(T arg) -> iVector<vtype, N> {
|
||||||
zeroit(*this);
|
zeroit(*this);
|
||||||
@ -304,6 +308,8 @@ public:
|
|||||||
|
|
||||||
enum { TensorLevel = GridTypeMapper<vtype>::TensorLevel + 1 };
|
enum { TensorLevel = GridTypeMapper<vtype>::TensorLevel + 1 };
|
||||||
|
|
||||||
|
static constexpr accelerator_inline int Nsimd(void) { return sizeof(vector_type)/sizeof(scalar_type); }
|
||||||
|
|
||||||
accelerator_inline iMatrix(const Zero &z) { zeroit(*this); };
|
accelerator_inline iMatrix(const Zero &z) { zeroit(*this); };
|
||||||
accelerator iMatrix() = default;
|
accelerator iMatrix() = default;
|
||||||
|
|
||||||
|
@ -48,4 +48,7 @@ Author: neo <cossu@post.kek.jp>
|
|||||||
#include <Grid/tensors/Tensor_extract_merge.h>
|
#include <Grid/tensors/Tensor_extract_merge.h>
|
||||||
#include <Grid/tensors/Tensor_logical.h>
|
#include <Grid/tensors/Tensor_logical.h>
|
||||||
|
|
||||||
|
// Maybe expect different thread on each SIMD lane
|
||||||
|
#include <Grid/tensors/Tensor_SIMT.h>
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user