Exemplo n.º 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());
            }
        }
Exemplo n.º 2
0
Arquivo: vector.hpp Projeto: 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));
            }
        }
Exemplo n.º 3
0
Arquivo: array.hpp Projeto: 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));
 }