MCPcopy Create free account
hub / github.com/pydata/numexpr / nc_abs2

Function nc_abs2

numexpr3/complex_functions.hpp:623–637  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

621}
622
623static void
624nc_abs2( npy_intp n, npy_complex64 *x, npy_intp sb1, npy_float32 *r )
625{
626 if( sb1 == sizeof(npy_complex64) ) { // Aligned
627 for( npy_intp I = 0; I < n; I++ ) {
628 r[I] = x[I].real*x[I].real + x[I].imag*x[I].imag;
629 }
630 }
631 else {
632 sb1 /= sizeof(npy_complex64);
633 for( npy_intp I = 0; I < n; I++ ) {
634 r[I] = x[I*sb1].real*x[I*sb1].real + x[I*sb1].imag*x[I*sb1].imag;
635 }
636 }
637}
638
639static void
640nc_abs2( npy_intp n, npy_complex128 *x, npy_intp sb1, npy_float64 *r )

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…