Skip to content

Commit f1e0ce8

Browse files
committed
Revert AlignmentAllocator changes
1 parent 39cdd8c commit f1e0ce8

File tree

4 files changed

+6
-10
lines changed

4 files changed

+6
-10
lines changed

SPlisHSPlasH/Elasticity/Elasticity_Kugelstadt2021.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,10 @@ namespace SPH
5656
#ifdef USE_AVX
5757
VectorXr m_rhs;
5858
VectorXr m_sol;
59-
std::vector<Scalarf8, AlignmentAllocator<Scalarf8>> m_RHS;
60-
std::vector<Scalarf8, AlignmentAllocator<Scalarf8>> m_f_avx;
61-
std::vector<Scalarf8, AlignmentAllocator<Scalarf8>> m_sol_avx;
62-
std::vector<Quaternion8f, AlignmentAllocator<Quaternion8f>> m_quats_avx;
59+
std::vector<Scalarf8, AlignmentAllocator<Scalarf8, 32>> m_RHS;
60+
std::vector<Scalarf8, AlignmentAllocator<Scalarf8, 32>> m_f_avx;
61+
std::vector<Scalarf8, AlignmentAllocator<Scalarf8, 32>> m_sol_avx;
62+
std::vector<Quaternion8f, AlignmentAllocator<Quaternion8f, 32>> m_quats_avx;
6363
#else
6464
std::vector<Vector3r, Eigen::aligned_allocator<Vector3r>> m_f;
6565
std::vector<Vector3r, Eigen::aligned_allocator<Vector3r>> m_sol;

SPlisHSPlasH/Utilities/AVX_math.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1471,11 +1471,7 @@ class Quaternion8f
14711471
// ----------------------------------------------------------------------------------------------
14721472
//alligned allocator so that vectorized types can be used in std containers
14731473
//from: https://stackoverflow.com/questions/8456236/how-is-a-vectors-data-aligned
1474-
#ifndef __APPLE__
14751474
template <typename T, std::size_t N = 32>
1476-
#else
1477-
template <typename T, std::size_t N = 16>
1478-
#endif
14791475
class AlignmentAllocator {
14801476
public:
14811477
typedef T value_type;

SPlisHSPlasH/Utilities/CholeskyAVXSolver.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ void CholeskyAVXSolver::solve(float* solution, const float* rhs, const int strid
2222
const CholeskySparseMatrixfAVX& LT = this->LT;
2323

2424
// AVX rhs
25-
std::vector<Scalarf8, AlignmentAllocator<Scalarf8>> rhs_avx(this->n_rhs_lines); // mem request for thread safe
25+
std::vector<Scalarf8, AlignmentAllocator<Scalarf8, 32>> rhs_avx(this->n_rhs_lines); // mem request for thread safe
2626
rhs_avx.back() = Scalarf8(0.0f); // For potential padding
2727

2828
union AVXfloatUnion {

SPlisHSPlasH/Utilities/CholeskyAVXSolver.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ namespace SPH
1919
public:
2020
// Fields
2121
//// AVX CRS Sparse matrix
22-
std::vector<Scalarf8, AlignmentAllocator<Scalarf8>> vals;
22+
std::vector<Scalarf8, AlignmentAllocator<Scalarf8, 32>> vals;
2323
std::vector<int> cols;
2424
std::vector<int> rows_offset;
2525

0 commit comments

Comments
 (0)