| 80 | |
| 81 | template <typename T> |
| 82 | static void |
| 83 | randomRotmg( |
| 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 |
no outgoing calls
no test coverage detected