~ubuntu-branches/debian/sid/lammps/sid

« back to all changes in this revision

Viewing changes to lib/gpu/lal_device.h

  • Committer: Package Import Robot
  • Author(s): Anton Gladky
  • Date: 2013-11-20 22:41:36 UTC
  • mfrom: (1.2.2)
  • Revision ID: package-import@ubuntu.com-20131120224136-tzx7leh606fqnckm
Tags: 0~20131119.git7162cf0-1
* [e65b919] Imported Upstream version 0~20131119.git7162cf0
* [f7bddd4] Fix some problems, introduced by upstream recently.
* [3616dfc] Use wrap-and-sort script.
* [7e92030] Ignore quilt dir

Show diffs side-by-side

added added

removed removed

Lines of Context:
45
45
    * - -2 if GPU not found
46
46
    * - -4 if GPU library not compiled for GPU
47
47
    * - -6 if GPU could not be initialized for use
48
 
    * - -7 if accelerator sharing is not currently allowed on system **/
 
48
    * - -7 if accelerator sharing is not currently allowed on system 
 
49
    * - -11 if vendor_string has the wrong number of parameters **/
49
50
  int init_device(MPI_Comm world, MPI_Comm replica, const int first_gpu, 
50
 
                   const int last_gpu, const int gpu_mode, 
51
 
                   const double particle_split, const int nthreads,
52
 
                   const int t_per_atom, const double cell_size);
 
51
                  const int last_gpu, const int gpu_mode, 
 
52
                  const double particle_split, const int nthreads,
 
53
                  const int t_per_atom, const double cell_size, 
 
54
                  char *vendor_string);
53
55
 
54
56
  /// Initialize the device for Atom and Neighbor storage
55
57
  /** \param rot True if quaternions need to be stored
234
236
  inline int max_bio_shared_types() const { return _max_bio_shared_types; }
235
237
  /// Architecture gpu code compiled for (returns 0 for OpenCL)
236
238
  inline double ptx_arch() const { return _ptx_arch; }
 
239
  /// Number of threads executing concurrently on same multiproc
 
240
  inline int warp_size() const { return _warp_size; }
237
241
 
238
242
  // -------------------- SHARED DEVICE ROUTINES -------------------- 
239
243
  // Perform asynchronous zero of integer array 
278
282
      pppm_double->precompute(ago,nlocal,nall,host_x,host_type,success,charge,
279
283
                              boxlo,prd);
280
284
  }
 
285
  
 
286
  inline std::string compile_string() { return _ocl_compile_string; }
281
287
 
282
288
 private:
283
289
  std::queue<Answer<numtyp,acctyp> *> ans_queue;
305
311
 
306
312
  int _data_in_estimate, _data_out_estimate;
307
313
  
 
314
  std::string _ocl_vendor_name, _ocl_vendor_string, _ocl_compile_string;
 
315
  int set_ocl_params(char *);
 
316
  
308
317
  template <class t>
309
318
  inline std::string toa(const t& in) {
310
319
    std::ostringstream o;