Recent

Author Topic: SIMD Intrinsics  (Read 3160 times)

Fiji

  • Guest
SIMD Intrinsics
« on: July 06, 2014, 01:15:09 pm »
Is this supported in FPC? I cannot rely on compiler producing SSE which is rather bad.

In C++ I can simply do:

Code: [Select]
__m128 *p1,*p2,*p3;
__declspec(align(16)) float f1[N],f2[N],f3[N];
for(int i=0;i<N;i++){
f1[i]=i+0.12;
f2[i]=i+0.16;
};
p1=(__m128*)f1;
p2=(__m128*)f2;
p3=(__m128*)f3;

finalpatch

  • New Member
  • *
  • Posts: 12
Re: SIMD Intrinsics
« Reply #1 on: July 06, 2014, 01:58:22 pm »
Intrinsics are not supported. But you do get to use inline assembly, it's less convenient, but gets the job done if you really need that speed.

Fiji

  • Guest
Re: SIMD Intrinsics
« Reply #2 on: July 06, 2014, 02:11:50 pm »
Intrinsics is far better approach.

Using assembly will usually result in several days of non-stop work, only to find out the compiler beats your best performance by 5%. (5% if you're really good; most likely 30%.)

 

TinyPortal © 2005-2018