summaryrefslogtreecommitdiffstats
path: root/vec_pseudo.h
diff options
context:
space:
mode:
authorErik Schnetter <schnetter@gmail.com>2013-04-23 15:05:21 -0400
committerErik Schnetter <schnetter@gmail.com>2013-04-23 15:05:21 -0400
commit2f4441d34b351ebb7e1462041d113f2508d3bea6 (patch)
tree6a1c310e99c7d849ed4a4f78daff919f7b367d42 /vec_pseudo.h
parent6c3228230920182fc3f0110d94ac9671933a3495 (diff)
downloadvecmathlib-2f4441d34b351ebb7e1462041d113f2508d3bea6.zip
vecmathlib-2f4441d34b351ebb7e1462041d113f2508d3bea6.tar.gz
Use explicitly defined alignment (instead of size) when checking for alignment in vec_pseudo
Diffstat (limited to 'vec_pseudo.h')
-rw-r--r--vec_pseudo.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/vec_pseudo.h b/vec_pseudo.h
index 173982c..ea3c5f5 100644
--- a/vec_pseudo.h
+++ b/vec_pseudo.h
@@ -493,7 +493,7 @@ namespace vecmathlib {
static realvec_t loada(real_t const* p)
{
- VML_ASSERT(intptr_t(p) % sizeof(realvec_t) == 0);
+ VML_ASSERT(intptr_t(p) % alignment == 0);
return loadu(p);
}
static realvec_t loadu(real_t const* p)
@@ -504,7 +504,7 @@ namespace vecmathlib {
}
static realvec_t loadu(real_t const* p, size_t ioff)
{
- VML_ASSERT(intptr_t(p) % sizeof(realvec_t) == 0);
+ VML_ASSERT(intptr_t(p) % alignment == 0);
return loadu(p+ioff);
}
realvec_t loada(real_t const* p, mask_t const& m) const
@@ -522,7 +522,7 @@ namespace vecmathlib {
void storea(real_t* p) const
{
- VML_ASSERT(intptr_t(p) % sizeof(realvec_t) == 0);
+ VML_ASSERT(intptr_t(p) % alignment == 0);
storeu(p);
}
void storeu(real_t* p) const
@@ -531,12 +531,12 @@ namespace vecmathlib {
}
void storeu(real_t* p, size_t ioff) const
{
- VML_ASSERT(intptr_t(p) % sizeof(realvec_t) == 0);
+ VML_ASSERT(intptr_t(p) % alignment == 0);
storeu(p+ioff);
}
void storea(real_t* p, mask_t const& m) const
{
- VML_ASSERT(intptr_t(p) % sizeof(realvec_t) == 0);
+ VML_ASSERT(intptr_t(p) % alignment == 0);
storeu(p, m);
}
void storeu(real_t* p, mask_t const& m) const
@@ -545,7 +545,7 @@ namespace vecmathlib {
}
void storeu(real_t* p, size_t ioff, mask_t const& m) const
{
- VML_ASSERT(intptr_t(p) % sizeof(realvec_t) == 0);
+ VML_ASSERT(intptr_t(p) % alignment == 0);
storeu(p+ioff, m);
}
OpenPOWER on IntegriCloud