Hi all,
I am using ArmPL 22 and want to use some functions in libamath, like exp, log, cos etc. By dumping libamath.so I can find intrinsics like armpl_svexp_f32_x, but it does not compile and I can not find any documents or examples. Could someone help me to compile SVE codes with ArmPL?
Thanks
I am still getting the same error with both gcc 10 and 11, and the library I am using is 22.0 (free version)
test.c: In function ‘main’:test.c:9:21: warning: implicit declaration of function ‘_ZGVsMxv_expf’ [-Wimplicit-function-declaration] 9 | svfloat32_t y = _ZGVsMxv_expf(x, p_all); | ^~~~~~~~~~~~~test.c:9:21: error: incompatible types when initializing type ‘svfloat32_t’ using type ‘int’
Or if I change the type of y from
svfloat32_t y = _ZGVsMxv_expf(x, p_all);
to
int y = _ZGVsMxv_expf(x, p_all);
The error becomes
test.c:9:13: error: SVE type ‘svfloat32_t’ cannot be passed to an unprototyped function 9 | int y = _ZGVsMxv_expf(x, p_all); | ^~~~~~~~~~~~~~~~~~~~~~~
I can compile the example from
https://developer.arm.com/documentation/102620/0100/Compile-and-test-the-examples
So I think I have set the environment correctly.
Right, math.h don't seem to expose the SVE symbols. You will have to declare the one you want to use manually in the header of your file, like that:
svfloat32_t _ZGVsMxv_expf(svfloat32_t, svbool_t);
svfloat32_t _ZGVsNxv_expf(svfloat32_t);
Thank you so much, it finally works!