Skip to content

Commit

Permalink
Complex: Add c{double,float}_abs_squared
Browse files Browse the repository at this point in the history
  • Loading branch information
inducer committed Aug 13, 2016
1 parent 717cf0c commit 96b08c4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pyopencl/cl/pyopencl-complex.h
Expand Up @@ -35,6 +35,7 @@
REAL_TP TPROOT##_real(TP a) { return a.real; } \
REAL_TP TPROOT##_imag(TP a) { return a.imag; } \
REAL_TP TPROOT##_abs(TP a) { return hypot(a.real, a.imag); } \
REAL_TP TPROOT##_abs_squared(TP a) { return a.real * a.real + a.imag * a.imag; } \
\
TP TPROOT##_new(REAL_TP real, REAL_TP imag) \
{ \
Expand Down

0 comments on commit 96b08c4

Please sign in to comment.