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;
 }
Beispiel #2
0
 static bool same_size( const thrust::device_vector< T > &x , const thrust::device_vector< T > &y )
 {
     return x.size() == y.size();
 }
Beispiel #3
0
 static void resize( thrust::device_vector< T > &x , const thrust::device_vector< T > &y )
 {
     x.resize( y.size() );
 }
Beispiel #4
0
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;
  }
}