git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@3049 f3b2605a-c512-4ea7-a41b-209d697bcdaa

This commit is contained in:
sjplimp 2009-08-11 22:28:59 +00:00
parent 5cc170ca01
commit ee24560ab6
4 changed files with 13 additions and 3 deletions

View File

@ -30,7 +30,7 @@ int LJ_GPU_MemoryT::bytes_per_atom(const int max_nbors) const {
}
template <class numtyp, class acctyp>
int LJ_GPU_MemoryT::get_max_atoms(const int gpu_bytes, const int max_nbors) {
int LJ_GPU_MemoryT::get_max_atoms(const size_t gpu_bytes, const int max_nbors) {
int matoms=static_cast<int>(PERCENT_GPU_MEMORY*gpu_bytes/
bytes_per_atom(max_nbors));
if (matoms>MAX_ATOMS)

View File

@ -50,7 +50,7 @@ class LJ_GPU_Memory {
/// Returns memory usage on GPU per atom
int bytes_per_atom(const int max_nbors) const;
/// Maximum number of atoms that can be stored on GPU
int get_max_atoms(const int gpu_bytes, const int max_nbors);
int get_max_atoms(const size_t gpu_bytes, const int max_nbors);
/// Total host memory used by library
double host_memory_usage() const;

View File

@ -29,19 +29,21 @@
#ifdef _SINGLE_DOUBLE
#define PRECISION float
#define ACC_PRECISION double
#define MAX_ATOMS 65536
#endif
#ifdef _DOUBLE_DOUBLE
#define PRECISION double
#define ACC_PRECISION double
#define MAX_ATOMS 32768
#endif
#ifndef PRECISION
#define PRECISION float
#define ACC_PRECISION double
#define MAX_ATOMS 65536
#endif
#define MAX_ATOMS 65536
#include "nvc_timer.h"
#include "pair_gpu_texture.h"

View File

@ -26,6 +26,14 @@
#ifndef PAIR_GPU_TEXTURE_H
#define PAIR_GPU_TEXTURE_H
#ifdef _SINGLE_DOUBLE
#define GB_GPU_DOUBLE
#endif
#ifdef _DOUBLE_DOUBLE
#define GB_GPU_DOUBLE
#endif
template <class numtyp> class cu_vec_traits;
template <> class cu_vec_traits<float> { public: typedef float2 vec2; };
template <> class cu_vec_traits<double> { public: typedef double2 vec2; };