vortexgpgpu/vortex

Wrong float generator in regression test vecaddx

dhy2000 opened this issue · 0 comments

In the test app regression/vecaddx, the Comparator<float>::generate return type is expected to be float, but it is int.

static int generate() {
return static_cast<float>(rand()) / RAND_MAX;
}

This method is used to generate random float vectors, but it always yields 0 under the mistake above which makes the test not rigorous enough (always testing 0.0 + 0.0 = 0.0).