Refactor parameter initialization for VCLAMP microkernels
- Use function pointers to initialize U8/F32 VCLAMP microkernel parameters
PiperOrigin-RevId: 391205483
diff --git a/src/f32-vclamp/avx.c.in b/src/f32-vclamp/avx.c.in
index 39bec88..ad9215e 100644
--- a/src/f32-vclamp/avx.c.in
+++ b/src/f32-vclamp/avx.c.in
@@ -27,8 +27,8 @@
assert(x != NULL);
assert(y != NULL);
- const __m256 vy_min = _mm256_broadcast_ps((const __m128*) params->sse.min);
- const __m256 vy_max = _mm256_broadcast_ps((const __m128*) params->sse.max);
+ const __m256 vy_min = _mm256_load_ps(params->avx.min);
+ const __m256 vy_max = _mm256_load_ps(params->avx.max);
for (; n >= ${BATCH_TILE} * sizeof(float); n -= ${BATCH_TILE} * sizeof(float)) {
__m256 vacc${ABC[0:8]} = _mm256_loadu_ps(x);