Reduce span check overhead. (#5464)
This commit is contained in:
@@ -63,11 +63,11 @@ TEST(Transform, Exception) {
|
||||
size_t const kSize {16};
|
||||
std::vector<bst_float> h_in(kSize);
|
||||
const HostDeviceVector<bst_float> in_vec{h_in, -1};
|
||||
EXPECT_ANY_THROW({
|
||||
EXPECT_DEATH({
|
||||
Transform<>::Init([](size_t idx, common::Span<float const> _in) { _in[idx + 1]; },
|
||||
Range(0, static_cast<Range::DifferenceType>(kSize)), -1)
|
||||
.Eval(&in_vec);
|
||||
});
|
||||
}, "");
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user