Skip to content

Commit

Permalink
gtests: fill_data: add a proper cast
Browse files Browse the repository at this point in the history
  • Loading branch information
dzarukin committed Jan 24, 2025
1 parent 0b75fd2 commit b8270fd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/gtests/dnnl_test_common.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,8 @@ inline void fill_data(memory::data_type dt, const memory &mem, float mean,
return;
}

size_t nelems = mem.get_desc().get_size() / dt_size;
memory::dim nelems
= static_cast<memory::dim>(mem.get_desc().get_size() / dt_size);
switch (dt) {
case memory::data_type::f32:
fill_data<float>(nelems, mem, mean, deviation, sparsity);
Expand Down

0 comments on commit b8270fd

Please sign in to comment.