Skip to content

Commit

Permalink
Removed broadcast() from matrix and vector pointers
Browse files Browse the repository at this point in the history
  • Loading branch information
mkatliar committed Oct 6, 2024
1 parent 85d47a1 commit 6114d2e
Show file tree
Hide file tree
Showing 11 changed files with 6 additions and 50 deletions.
6 changes: 0 additions & 6 deletions include/blast/math/RowColumnVectorPointer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,6 @@ namespace blast
}


SimdVecType broadcast() const noexcept
{
return ptr_.broadcast();
}


void store(SimdVecType const& val) const noexcept
{
ptr_.store(transposeFlag, val);
Expand Down
6 changes: 0 additions & 6 deletions include/blast/math/dense/DynamicMatrixPointer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,6 @@ namespace blast
}


SimdVecType broadcast() const noexcept
{
return *ptr_;
}


void store(SimdVecType const& val) const noexcept
{
val.store(ptr_, AF);
Expand Down
6 changes: 0 additions & 6 deletions include/blast/math/dense/DynamicVectorPointer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,6 @@ namespace blast
}


SimdVecType broadcast() const noexcept
{
return *ptr_;
}


void store(IntrinsicType val) const noexcept
{
// Non-optimized
Expand Down
6 changes: 0 additions & 6 deletions include/blast/math/dense/StaticMatrixPointer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,6 @@ namespace blast
}


SimdVecType broadcast() const noexcept
{
return SimdVecType {*ptr_};
}


void store(SimdVecType const& val) const noexcept
{
val.store(ptr_, AF);
Expand Down
6 changes: 0 additions & 6 deletions include/blast/math/dense/StaticVectorPointer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,6 @@ namespace blast
}


SimdVecType broadcast() const noexcept
{
return *ptr_;
}


void store(SimdVecType val) const noexcept
{
if constexpr (S == 1)
Expand Down
6 changes: 0 additions & 6 deletions include/blast/math/panel/DynamicPanelMatrixPointer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,6 @@ namespace blast
}


SimdVecType broadcast() const noexcept
{
return SimdVecType {*ptr_};
}


void store(SimdVecType const& val) const noexcept
{
static_assert(AF, "store() implemented only for aligned pointers");
Expand Down
6 changes: 0 additions & 6 deletions include/blast/math/panel/StaticPanelMatrixPointer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,6 @@ namespace blast
}


SimdVecType broadcast() const noexcept
{
return SimdVecType {*ptr_};
}


void store(SimdVecType const& val) const noexcept
{
static_assert(AF, "store() implemented only for aligned pointers");
Expand Down
4 changes: 2 additions & 2 deletions include/blast/math/register_matrix/DynamicRegisterMatrix.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ namespace blast
#pragma unroll
for (size_t j = 0; j < N; ++j) if (j < n_)
{
SimdVecType bx = b(0, j).broadcast();
SimdVecType const bx = b[0, j];

#pragma unroll
for (size_t i = 0; i < RM; ++i) // TODO: !!! check i against m
Expand All @@ -430,7 +430,7 @@ namespace blast
#pragma unroll
for (size_t j = 0; j < N; ++j) if (j < n_)
{
SimdVecType bx = b(0, j).broadcast();
SimdVecType bx = b[0, j];

#pragma unroll
for (size_t i = 0; i < RM; ++i) // TODO: !!! check i against m
Expand Down
8 changes: 4 additions & 4 deletions include/blast/math/register_matrix/RegisterMatrix.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -571,14 +571,14 @@ namespace blast
#pragma unroll
for (size_t k = 0; k < j; ++k)
{
SimdVecType const a_kj = (~A)(k, j).broadcast();
SimdVecType const a_kj = A[k, j];

#pragma unroll
for (size_t i = 0; i < RM; ++i)
v_[i][j] = fnmadd(a_kj, v_[i][k], v_[i][j]);
}

IntrinsicType const a_jj = (~A)(j, j).broadcast();
SimdVecType const a_jj = A[j, j];

#pragma unroll
for (size_t i = 0; i < RM; ++i)
Expand Down Expand Up @@ -759,7 +759,7 @@ namespace blast
#pragma unroll
for (size_t j = 0; j < N; ++j)
{
SimdVecType bx = bu(0, j).broadcast();
SimdVecType const bx = bu[0, j];

#pragma unroll
for (size_t i = 0; i < ii; ++i)
Expand Down Expand Up @@ -796,7 +796,7 @@ namespace blast
#pragma unroll
for (size_t j = 0; j <= k; ++j)
{
SimdVecType ax = au(0, j).broadcast();
SimdVecType const ax = au[0, j];

#pragma unroll
for (size_t i = 0; i < RM; ++i)
Expand Down
1 change: 0 additions & 1 deletion include/blast/math/typetraits/MatrixPointer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ namespace blast
p(i, j);
p[i, j];
p.load();
p.broadcast();
p.vmove(i);
p.hmove(j);
p.spacing();
Expand Down
1 change: 0 additions & 1 deletion include/blast/math/typetraits/VectorPointer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ namespace blast
p(i);
p[i];
p.load();
p.broadcast();
p.spacing();
p.trans();
~p;
Expand Down

0 comments on commit 6114d2e

Please sign in to comment.