Add AVX512 optimizations for matrix multiply

This commit is contained in:
aaraujom
2022-05-12 23:41:19 +00:00
committed by Rasmus Munk Larsen
parent 00b75375e7
commit 25db0b4a82
17 changed files with 1251 additions and 142 deletions

View File

@@ -173,6 +173,7 @@ class blas_data_mapper<Scalar,Index,StorageOrder,AlignmentType,1>
public:
typedef BlasLinearMapper<Scalar, Index, AlignmentType> LinearMapper;
typedef BlasVectorMapper<Scalar, Index> VectorMapper;
static constexpr int incr = 1;
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE blas_data_mapper(Scalar* data, Index stride, Index incr=1)
: m_data(data), m_stride(stride)
@@ -285,6 +286,7 @@ class blas_data_mapper
{
public:
typedef BlasLinearMapper<Scalar, Index, AlignmentType,Incr> LinearMapper;
static constexpr int incr = Incr;
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE blas_data_mapper(Scalar* data, Index stride, Index incr) : m_data(data), m_stride(stride), m_incr(incr) {}
@@ -402,6 +404,9 @@ public:
storePacketBlock_helper<SubPacket, Scalar, n, n-1> spb;
spb.store(this, i,j,block);
}
EIGEN_DEVICE_FUNC const Index stride() const { return m_stride; }
EIGEN_DEVICE_FUNC Scalar* data() const { return m_data; }
protected:
Scalar* EIGEN_RESTRICT m_data;
const Index m_stride;