This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to compile SVE with ArmPL?

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

Parents
  • Hi Blanchard,

    Thank you for the reply! I am trying to compile a simple program as follow:

    #include <math.h>
    #include <arm_sve.h>
    #include <armpl.h>

    int main() {
        svfloat32_t x = svdup_f32(4.0);
        svbool_t p_all = svptrue_b32();

        svfloat32_t y = _ZGVsMxv_exp(x, p_all);

        return 0;
    }


    The command line I use is:
    gcc -O3 -march=armv8-a+sve -o test test.c -lamath -lm
     
    And the error I get is:
    test.c: In function ‘main’:
    test.c:9:21: warning: implicit declaration of function ‘_ZGVsMxv_exp’ [-Wimplicit-function-declaration]
    9 | svfloat32_t y = _ZGVsMxv_exp(x, p_all);
    | ^~~~~~~~~~~~
    test.c:9:21: error: incompatible types when initializing type ‘svfloat32_t’ using type ‘int’

Reply
  • Hi Blanchard,

    Thank you for the reply! I am trying to compile a simple program as follow:

    #include <math.h>
    #include <arm_sve.h>
    #include <armpl.h>

    int main() {
        svfloat32_t x = svdup_f32(4.0);
        svbool_t p_all = svptrue_b32();

        svfloat32_t y = _ZGVsMxv_exp(x, p_all);

        return 0;
    }


    The command line I use is:
    gcc -O3 -march=armv8-a+sve -o test test.c -lamath -lm
     
    And the error I get is:
    test.c: In function ‘main’:
    test.c:9:21: warning: implicit declaration of function ‘_ZGVsMxv_exp’ [-Wimplicit-function-declaration]
    9 | svfloat32_t y = _ZGVsMxv_exp(x, p_all);
    | ^~~~~~~~~~~~
    test.c:9:21: error: incompatible types when initializing type ‘svfloat32_t’ using type ‘int’

Children