MCPcopy Create free account
hub / github.com/clMathLibraries/clBLAS / randomRotmg

Function randomRotmg

src/tests/include/rotmg.h:82–103  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

80
81template <typename T>
82static void
83randomRotmg(
84 T *D1,
85 T *D2,
86 T *X,
87 T *Y,
88 T *PARAM
89 )
90{
91 // Since rotmg involves upto 3 multiplication on an element, taking cube-root
92 cl_double bound = pow(UPPER_BOUND<T>(), (1.0/3)) / 2.0;
93
94 *D1 = random<T>(bound);
95 *D2 = random<T>(bound);
96 *X = random<T>(bound);
97 *Y = random<T>(bound);
98
99 // Populate PARAM. Flag in PARAM[0] is expected to be set outside this function call
100 for(int i=1; i<=4; i++) {
101 PARAM[i] = random<T>(bound);
102 }
103}
104
105#endif

Callers 3

rotmgCorrectnessTestFunction · 0.85
prepareMethod · 0.85
generateDataMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected