@@ -45,6 +45,7 @@ namespace deglib::distances::fp32_ip {
4545 }
4646 };
4747
48+ #if defined(DEGLIB_X86)
4849 // -------------------------------------------------------------------
4950 // InnerProductFloat16Ext — processes 16 floats (64 bytes) per iteration.
5051 // Separate classes per SIMD width so that compare() has zero
@@ -300,10 +301,12 @@ namespace deglib::distances::fp32_ip {
300301 return 1 .f - (res + res_tail);
301302 }
302303 };
304+ #endif
303305
304306 using DistanceVariant = std::variant<
305- InnerProductFloat,
306- InnerProductFloat16Ext_AVX512,
307+ InnerProductFloat
308+ #if defined(DEGLIB_X86)
309+ , InnerProductFloat16Ext_AVX512,
307310 InnerProductFloat16Ext_AVX2,
308311 InnerProductFloat16Ext_SSE,
309312 InnerProductFloat8Ext_AVX2,
@@ -313,9 +316,11 @@ namespace deglib::distances::fp32_ip {
313316 InnerProductFloat16ExtResiduals_AVX2,
314317 InnerProductFloat16ExtResiduals_SSE,
315318 InnerProductFloat4ExtResiduals_SSE
319+ #endif
316320 >;
317321
318322 inline DistanceVariant select_dist (const size_t dim) {
323+ #if defined(DEGLIB_X86)
319324 if (deglib::cpu::has_avx512 ()) {
320325 if (dim % 16 == 0 )
321326 return InnerProductFloat16Ext_AVX512{};
@@ -352,6 +357,7 @@ namespace deglib::distances::fp32_ip {
352357 else if (dim > 4 )
353358 return InnerProductFloat4ExtResiduals_SSE{};
354359 }
360+ #endif
355361 return InnerProductFloat{};
356362 }
357363
0 commit comments