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

Function nc_complex

numexpr3/complex_functions.hpp:109–126  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

107}
108
109static void
110nc_complex( npy_intp n, npy_float32 *a, npy_intp sb1, npy_float32 *b, npy_intp sb2, npy_complex64 *r )
111{
112 if( sb1 == sizeof(npy_float32) && sb2 == sizeof(npy_float32) ) { // Aligned
113 for( npy_intp I = 0; I < n; I++ ) {
114 r[I].real = a[I];
115 r[I].imag = b[I];
116 }
117 }
118 else {
119 sb1 /= sizeof(npy_float32);
120 sb2 /= sizeof(npy_float32);
121 for( npy_intp I = 0; I < n; I++ ) {
122 r[I].real = a[I*sb1];
123 r[I].imag = b[I*sb2];
124 }
125 }
126}
127
128static void
129nc_complex( npy_intp n, npy_float64 *a, npy_intp sb1, npy_float64 *b, npy_intp sb2, npy_complex128 *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…