28 typedef typename Vec::EntryType
T;
30 Count = 256 * 1024 /
sizeof(
T)
36 std::memset(array, 0xff, Count *
sizeof(T));
39 for (
int i = 0; i < Count; i +=
Vec::Size) {
43 for (
int i = 0; i < Count; ++i) {
50 typedef typename Vec::EntryType
T;
52 Count = 256 * 1024 /
sizeof(
T)
58 std::memset(array, 0xff, Count *
sizeof(T));
65 for (
int i = 1; i < Count - Vec::Size + 1; ++i) {
72 typedef typename Vec::EntryType
T;
74 Count = 256 * 1024 /
sizeof(
T)
80 std::memset(array, 0xff, Count *
sizeof(T));
83 for (
int i = 0; i < Count; i +=
Vec::Size) {
87 for (
int i = 0; i < Count; ++i) {
94 typedef typename Vec::EntryType
T;
96 Count = 256 * 1024 /
sizeof(
T)
102 std::memset(array, 0xff, Count *
sizeof(T));
109 for (
int i = 1; i < Count - Vec::Size + 1; ++i) {
116 typedef typename Vec::EntryType
T;
117 typedef typename Vec::Mask M;
120 typedef typename Vec::IndexType
I;
122 const typename I::Mask k = (tmp &
I(
One)) > 0;
126 const int count = 256 * 1024 /
sizeof(
T);
127 const int outerCount = count /
Vec::Size;
130 const T nullValue = 0;
131 const T setValue = 170;
132 const Vec
x(setValue);
133 for (
int i = 0; i < count; i +=
Vec::Size) {
134 x.store(&array[i], mask);
137 for (
int i = 1; i < count; i += 2) {
138 COMPARE(array[i], setValue) <<
", i: " << i <<
", count: " << count <<
", outer: " << outerCount;
140 for (
int i = 0; i < count; i += 2) {
141 COMPARE(array[i], nullValue) <<
", i: " << i <<
", count: " << count <<
", outer: " << outerCount;
145 int main(
int argc,
char **argv)
158 runTest(maskedStore<double_v>);
160 runTest(maskedStore<ushort_v>);
161 runTest(maskedStore<sfloat_v>);
void initTest(int argc, char **argv)
void streamingAndAlignedStore()
#define testAllTypes(name)
A helper class for fixed-size two-dimensional arrays.
int main(int argc, char **argv)
Vc_ALWAYS_INLINE void setZero()
void streamingAndUnalignedStore()