diff --git a/pyopencl/cl/pyopencl-complex.h b/pyopencl/cl/pyopencl-complex.h
index 976bf81a62dcef2511cb20a4d01220542fca23be..7518e8108e1123fa157f943d05f833ba8615c28d 100644
--- a/pyopencl/cl/pyopencl-complex.h
+++ b/pyopencl/cl/pyopencl-complex.h
@@ -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) \
   { \