lammps-master/lib/gpu/lal_atom.h
inline void add_x_data(double **host_ptr, int *host_type) {
    time_pos.start();
    if (_x_avail==false) {
      #ifdef GPU_CAST
      x_cast.update_device(_nall*3,true);
      type_cast.update_device(_nall,true);
      int block_size=64;
      int GX=static_cast<int>(ceil(static_cast<double>(_nall)/block_size));
      k_cast_x.set_size(GX,block_size);
      k_cast_x.run(&x, &x_cast, &type_cast, &_nall);
      #else
      x.update_device(_nall*4,true);
      #endif
      _x_avail=true;
    }
    time_pos.stop();
  }
/// Copy positions and types to device asynchronously
/** Copies nall() elements **/
Copy positions and types to device asynchronously
Copies nall() elements
Copy positions and types to device asynchronously Copies nall () elements
inline void add_x_data(double **host_ptr, int *host_type) {
    time_pos.start();
    if (_x_avail==false) {
      #ifdef GPU_CAST
      x_cast.update_device(_nall*3,true);
      type_cast.update_device(_nall,true);
      int block_size=64;
      int GX=static_cast<int>(ceil(static_cast<double>(_nall)/block_size));
      k_cast_x.set_size(GX,block_size);
      k_cast_x.run(&x, &x_cast, &type_cast, &_nall);
      #else
      x.update_device(_nall*4,true);
      #endif
      _x_avail=true;
    }
    time_pos.stop();
  }
inline void add_x_data ( double * * host_ptr , int * host_type ) { time_pos . start ( ) ; if ( _x_avail == false ) { #ifdef GPU_CAST x_cast . update_device ( _nall * 3 , true ) ; type_cast . update_device ( _nall , true ) ; int block_size = 64 ; int GX = static_cast < int > ( ceil ( static_cast < double > ( _nall ) / block_size ) ) ; k_cast_x . set_size ( GX , block_size ) ; k_cast_x . run ( & x , & x_cast , & type_cast , & _nall ) ; #else x . update_device ( _nall * 4 , true ) ; #endif _x_avail = true ; } time_pos . stop ( ) ; }
Copy positions and types to device asynchronously
Copies nall() elements
Copy positions and types to device asynchronously Copies nall () elements