Hi, I have some issues exposing C intrinsics to Nimrod. I'm not sure at all if I use the right pragmas and types. Here's my code:
type
m256* {.pure, bycopy, final.} = object
v0,v1,v2,v3,v4,v5,v6,v7: float32
proc mm256_add_ps* (m1: m256, m2: m256): m256 {.nodecl, importc: "_mm256_add_ps", header: "<immintrin.h>".}
$ nimrod --parallelBuild:1 --passl:mavx -r c main
nimcache/nimtest_main.c:256:11: error: incompatible types when assigning to type ‘m256118005’ from type ‘int’
Thanks!
Hi, thanks! My bad, I was using --passl:-mavx instead of --passc:-mavx.
Btw, are there any pragmas to align a type on 16/32 byte boundaries, as it required for load/store intrinsics? It seems to be the case for me, but it could have segfaulted (unless Nimrod assures this behavior).