Skip to content

Commit

Permalink
address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
TaoLv committed Feb 16, 2020
1 parent 38070d9 commit 56d873f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/cpp/include/test_mkldnn.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ inline static void InitDefaultArray(NDArray *arr, bool is_rand = false, int max

for (int i = 0; i < size; i++)
if (is_rand) {
data[i] = (std::rand() % (max * 2)) - max;
data[i] = std::rand() * 1.0f / RAND_MAX * max * 2 - max;
} else {
data[i] = i % (max * 2) - max;
data[i] = i * 1.0f / size * max * 2 - max;
}
}

Expand Down

0 comments on commit 56d873f

Please sign in to comment.