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

Which definition is right for "ne10_addc_float_c"?

Hi,

On a Get Start thread of this web site, it has a short NE10 example having such snippet:

      ne10_addc_float_c( thedst1 , thesrc, thecst, ARRAY_LENGTH );
 
      ne10_addc_float_neon( thedst2 , thesrc, thecst, ARRAY_LENGTH );

I install NE10 library. In the documentation, it has a different definition:

ne10_result_t ne10_addc_float_neon (ne10_float32_t *dst, ne10_float32_t *src, const ne10_float32_t cst, ne10_uint32_t count) asm("ne10_addc_float_neon")

I am curious about the last "asm("ne10_addc_float_neon")". Could you tell me that?

Thanks,

Parents
  • Hi, Ruwan2,

    >Hi,

    >On a Get Start thread of this web site, it has a short NE10 example having such snippet:

       ne10_addc_float_c( thedst1 , thesrc, thecst, ARRAY_LENGTH );
    >
       ne10_addc_float_neon( thedst2 , thesrc, thecst, ARRAY_LENGTH );

    These 2 functions are different functions, but they have same functionality. Generally, the difference is: ne10_addc_float_c is implemented in C and ne10_addc_float_neon is implemented by assembly and optimized by Neon.

    >

    >I install NE10 library. In the documentation, it has a different definition:

    >

    >ne10_result_t ne10_addc_float_neon (ne10_float32_t *dst, ne10_float32_t *src, const ne10_float32_t cst, ne10_uint32_t count) asm("ne10_addc_float_neon")

    >

    >I am curious about the last "asm("ne10_addc_float_neon")". Could you tell me that?

    the asm() key word is used to specify the name in generated object file. It is a C extension. You can refer more details at http://gcc.gnu.org/onlinedocs/gcc-4.8.2/gcc/Asm-Labels.html#Asm-Labels.

    >Thanks,

Reply
  • Hi, Ruwan2,

    >Hi,

    >On a Get Start thread of this web site, it has a short NE10 example having such snippet:

       ne10_addc_float_c( thedst1 , thesrc, thecst, ARRAY_LENGTH );
    >
       ne10_addc_float_neon( thedst2 , thesrc, thecst, ARRAY_LENGTH );

    These 2 functions are different functions, but they have same functionality. Generally, the difference is: ne10_addc_float_c is implemented in C and ne10_addc_float_neon is implemented by assembly and optimized by Neon.

    >

    >I install NE10 library. In the documentation, it has a different definition:

    >

    >ne10_result_t ne10_addc_float_neon (ne10_float32_t *dst, ne10_float32_t *src, const ne10_float32_t cst, ne10_uint32_t count) asm("ne10_addc_float_neon")

    >

    >I am curious about the last "asm("ne10_addc_float_neon")". Could you tell me that?

    the asm() key word is used to specify the name in generated object file. It is a C extension. You can refer more details at http://gcc.gnu.org/onlinedocs/gcc-4.8.2/gcc/Asm-Labels.html#Asm-Labels.

    >Thanks,

Children
No data