MCPcopy Create free account
hub / github.com/arrayfire/arrayfire / state_read

Function state_read

src/backend/cuda/kernel/random_engine_mersenne.hpp:61–69  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

59}
60
61static inline __device__ void state_read(uint *const state,
62 const uint *const gState) {
63 const uint *const g = gState + (blockIdx.x * N);
64 state[STATE_SIZE - N + threadIdx.x] = g[threadIdx.x];
65 if (threadIdx.x < N - blockDim.x) {
66 state[STATE_SIZE - N + blockDim.x + threadIdx.x] =
67 g[blockDim.x + threadIdx.x];
68 }
69}
70
71static inline __device__ void state_write(uint *const gState,
72 const uint *const state) {

Callers 2

uniformMersenneFunction · 0.70
normalMersenneFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected