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

Function getDoubleNegative11

src/backend/cuda/kernel/random_engine.hpp:152–158  ·  view source on GitHub ↗

Generates rationals in (-1, 1]

Source from the content-addressed store, hash-verified

150
151// Generates rationals in (-1, 1]
152__device__ static double getDoubleNegative11(uint num1, uint num2) {
153 uint32_t arr[2] = {num2, num1};
154 uint64_t num;
155
156 memcpy(&num, arr, sizeof(uint64_t));
157 return fma(static_cast<double>(num), signed_factor, half_factor);
158}
159
160namespace {
161

Callers 2

Calls 1

fmaFunction · 0.85

Tested by

no test coverage detected