Skip to content

Commit cd660a5

Browse files
committed
gtests: fill_data: add a proper cast
1 parent ff3800c commit cd660a5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/gtests/dnnl_test_common.hpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,8 @@ inline void fill_data(memory::data_type dt, const memory &mem, float mean,
443443
return;
444444
}
445445

446-
size_t nelems = mem.get_desc().get_size() / dt_size;
446+
memory::dim nelems
447+
= static_cast<memory::dim>(mem.get_desc().get_size() / dt_size);
447448
switch (dt) {
448449
case memory::data_type::f32:
449450
fill_data<float>(nelems, mem, mean, deviation, sparsity);

0 commit comments

Comments
 (0)