void load_impl(input_archive & ar, std::vector<T, Allocator> & v, std::true_type) { if(ar.disable_array_optimization()) { load_impl(ar, v, std::false_type()); } else { // bitwise load ... typedef typename std::vector<T, Allocator>::size_type size_type; size_type size; ar >> size; //-V128 if(size == 0) return; v.resize(size); ar >> hpx::serialization::make_array(v.data(), v.size()); } }
void load_impl(input_archive & ar, compute::vector<T, Allocator> & v, std::true_type) { if(ar.disable_array_optimization()) { load_impl(ar, v, std::false_type()); } else { // bitwise load ... typedef typename compute::vector<T, Allocator>::value_type value_type; typedef typename compute::vector<T, Allocator>::size_type size_type; size_type size; ar >> size; //-V128 if(size == 0) return; v.resize(size); load_binary(ar, &v[0], v.size() * sizeof(value_type)); } }
void serialize_optimized(input_archive& ar, unsigned int, std::true_type) { // try using chunking ar.load_binary_chunk(m_t, m_element_count * sizeof(T)); }