Skip to content

Commit

Permalink
Silence an MSVC warning that only triggers when this branch is not ta…
Browse files Browse the repository at this point in the history
…ken.

Bug 200513211
  • Loading branch information
griwes authored and brycelelbach committed May 31, 2019
1 parent f422c73 commit ee63d40
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions testing/random.cu
Original file line number Diff line number Diff line change
Expand Up @@ -766,12 +766,20 @@ template<typename Distribution, typename Validator>
// test Distribution with same range as engine

// test host
thrust::generate(h.begin(), h.end(), Validator(Distribution(Engine::min, Engine::max)));
THRUST_DISABLE_MSVC_WARNING_BEGIN(4305)
thrust::generate(h.begin(), h.end(), Validator(
Distribution(Engine::min, Engine::max)
));
THRUST_DISABLE_MSVC_WARNING_END(4305)

ASSERT_EQUAL(true, h[0]);

// test device
thrust::generate(d.begin(), d.end(), Validator(Distribution(Engine::min, Engine::max)));
THRUST_DISABLE_MSVC_WARNING_BEGIN(4305)
thrust::generate(d.begin(), d.end(), Validator(
Distribution(Engine::min, Engine::max)
));
THRUST_DISABLE_MSVC_WARNING_END(4305)

ASSERT_EQUAL(true, d[0]);

Expand Down

0 comments on commit ee63d40

Please sign in to comment.