static void test() { tbb::flow::graph g; flags.reserve(Count); SType* my_split = makeSplit<SIZE,SType>::create(g); sink_node_helper<SIZE, SType>::print_serial_remark(); REMARK(" >\n"); test_one_serial<SType>( *my_split, g); // build the vector with copy construction from the used split node. std::vector<SType>split_vector(ELEMS, *my_split); // destroy the tired old split_node in case we're accidentally reusing pieces of it. makeSplit<SIZE,SType>::destroy(my_split); for(int e = 0; e < ELEMS; ++e) { // exercise each of the vector elements test_one_serial<SType>( split_vector[e], g); } }
Complex* Gates::get_subvector(Complex *vec, int index_vec){ return split_vector(vec, (index_vec - 1)*KRON_SIZE_EACH_VECTOR, KRON_SIZE_EACH_VECTOR); }