示例#1
0
        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());
            }
        }
示例#2
0
文件: vector.hpp 项目: 7ev3n/hpx
        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));
            }
        }
示例#3
0
文件: array.hpp 项目: 7ev3n/hpx
 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));
 }