Compiler warning when copying from std::array.
- Dominant language
- C++
- Stars
- 1.7k
- Forks
- 340
- PR merge metrics
- No merged PRs in 30d
Description
When copying a std::array to a compute::vector, e.g.,
std::array host_tmp{ 1.0, 2.0, 3.0 };
compute::vector device_tmp(host_tmp.size(), context);
compute::copy(host_tmp.begin(), host_tmp.end(), device_tmp.begin(), queue);
I get a compiler warning `'argument': conversion from 'size_t' to 'boost::compute::uint_', possible loss of data` coming from lines 332 and 336 of boost\compute\algorithm\copy.hpp, i.e. the lines
map_copy_threshold =
parameters->get(
cache_key, "map_copy_threshold", map_copy_threshold
);
direct_copy_threshold =
parameters->get(
cache_key, "direct_copy_threshold", direct_copy_threshold
);
This doesn't happen if I use a std::vector instead of a std::array.
Contributor guide
Assessment
This issue has not been assessed yet.