Sqr on complex buffer


I’m looking for a well optimized library that can calculate the SQR of a complex buffer (inplace \ outplace)
On each item, SQR = Real^2 + Imag^2

Can you please help ?

Thank you,

You can write a cuda kernel to do this, it’s a trivial operation. There really isn’t much to optimize except load/store characteristics.

If you want a library, thrust::transform could do it for you

Hi txbob,

Thank you very much.
Best regards,