simd-everywhere / simde

Implementations of SIMD instruction sets for systems which don't natively support them.
https://simd-everywhere.github.io/blog/
MIT License
2.32k stars 239 forks source link

warnings when compiling for arm64 with 16-bit floats #1104

Closed mr-c closed 10 months ago

mr-c commented 10 months ago

SIMDe version: latest dev

In this particular case I was compiling with -mcpu=cortex-a76.cortex-a55 -O3 -fopenmp-simd -DSIMDE_ENABLE_OPENMP for a Pixel 4a 5g, but probably fewer flags are required to trigger the warning.

[1048/3669] Compiling C object test/arm/neon/aba-native-c.p/aba.c.o
In file included from ../test/arm/neon/aba.c:3:
../test/arm/neon/test-neon.h: In function 'simde_test_arm_neon_assert_equal_f16x4_':
../test/arm/neon/test-neon.h:47:48: warning: passing argument 1 of 'simde_vst1_f16' from incompatible pointer type [-Wincompatible-pointer-types]
   47 |     simde_vst1##modifier##_##symbol_identifier(a_, a); \
      |                                                ^~
      |                                                |
      |                                                simde_float16 * {aka _Float16 *}
../test/arm/neon/test-neon.h:115:1: note: in expansion of macro 'SIMDE_TEST_ARM_NEON_GENERATE_FLOAT_TYPE_EQUAL_FUNC_'
  115 | SIMDE_TEST_ARM_NEON_GENERATE_FLOAT_TYPE_EQUAL_FUNC_(float16x4_t, simde_float16_t, simde_float16, 4,  , f16)
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

If -DSIMDE_FLOAT16_API=4 (SIMDE_FLOAT16_API_FP16) is set then the warning go away.