feat: part2 and zip

This commit is contained in:
ytshih committed 2026-10-05 09:13:57 +08:00
1 parent 948d16d378
commit 54a56ee8a0
7 files changed
+41 -4

No files matched your search

+5
View File
@@ -1,4 +1,6 @@
#include "PPintrin.h"
#include <algorithm>
#include <iostream>
// implementation of absSerial(), but it is vectorized using PP intrinsics
void absVector(float *values, float *output, int N)
@@ -84,6 +86,9 @@ void clampedExpVector(float *values, int *exponents, float *output, int N)
_pp_vload_int(y, exponents + i, maskAll); // y = exponents[i];
}
cout << "min exponents: " << *min_element(y.value, y.value+VECTOR_WIDTH) << endl;
cout << "max exponents: " << *max_element(y.value, y.value+VECTOR_WIDTH) << endl;
_pp_vset_float(result, 1.f, maskAll);
maskNonZero = _pp_init_ones();
while (_pp_cntbits(maskNonZero) > 0) {