epsproc.geomFunc.w3jVecMethods module
ePSproc Wigner 3j vector methods
Functions for accelerated (vector, parallel, GPU) Wigner 3j calculations.
26/02/20 v1 Functions for accelerated Wigner 3j calcs plus sorting.
- epsproc.geomFunc.w3jVecMethods.w3jguVecCPU(QNs, w3j_QNs)
Wrapper for 3j with vectorization via @numba.guvectorize([“void(int32[:,:], float64[:])”], ‘(n,m)->(n)’, target = ‘parallel’).
- Parameters
QNs (np.array) – Array of QNs to calculated Wigner 3j terms for, columns [l,lp,L,m,mp,M].
w3j_QNs (np.array) – Empty array to hold results (no return from @guvectorize). Create as w3j_QNs = np.zeros(QNs.shape[0])
- epsproc.geomFunc.w3jVecMethods.w3jprange(QNs)
Wrapper for 3j with @numba.njit(parallel=True), using prange parallel loop.
In testing (Feb 2020) on an AMD Threadripper 1950X (16 core) this was (usually) fastest case, and beat vectorised version.
- Parameters
QNs (np.array) – Array of QNs to calculated Wigner 3j terms for, columns [l,lp,L,m,mp,M].
- Returns
w3j_QNs – Array of Wigner 3j results, one per row of input QNs.
- Return type
np.array