Download cmake/checks/cpu_neon_dotprod.cpp from tgollogly/test: direct link, hf CLI and curl.
- Browser
- Download file 571 Bytes
-
https://huggingface.co/tgollogly/test/resolve/main/cmake/checks/cpu_neon_dotprod.cpp
- Command line
-
hf download hf://tgollogly/test/cmake/checks/cpu_neon_dotprod.cpp
-
curl -L -o cpu_neon_dotprod.cpp https://huggingface.co/tgollogly/test/resolve/main/cmake/checks/cpu_neon_dotprod.cpp
571 Bytes
| int test() | |
| { | |
| const unsigned int src[] = { 0, 0, 0, 0 }; | |
| unsigned int dst[4]; | |
| uint32x4_t v_src = *(uint32x4_t*)src; | |
| uint8x16_t v_m0 = *(uint8x16_t*)src; | |
| uint8x16_t v_m1 = *(uint8x16_t*)src; | |
| uint32x4_t v_dst = vdotq_u32(v_src, v_m0, v_m1); | |
| *(uint32x4_t*)dst = v_dst; | |
| return (int)dst[0]; | |
| } | |
| int main() | |
| { | |
| printf("%d\n", test()); | |
| return 0; | |
| } | |