PODMap<GlobalOrdinal> getPOD() const { PODMap<GlobalOrdinal> ret; ret.n=d_ids.size(); ret.rows=const_cast<GlobalOrdinal*>(thrust::raw_pointer_cast(&d_rows[0])); ret.ids=const_cast<GlobalOrdinal*>(thrust::raw_pointer_cast(&d_ids[0])); return ret; }
static bool same_size( const thrust::device_vector< T > &x , const thrust::device_vector< T > &y ) { return x.size() == y.size(); }
static void resize( thrust::device_vector< T > &x , const thrust::device_vector< T > &y ) { x.resize( y.size() ); }
void print_cuda_vec(const thrust::device_vector<Scalar>& vec, const std::string& name) { for(size_t i=0; i<vec.size(); ++i) { std::cout << name << "["<<i<<"]: " << vec[i] << std::endl; } }