Feb2021 GPU Package Update - GPU Package Files

This commit is contained in:
Michael Brown
2021-02-15 08:20:50 -08:00
parent 16004e8f45
commit e7e2d2323b
345 changed files with 13424 additions and 7708 deletions

View File

@ -47,6 +47,44 @@ class NeighborShared {
/// Texture for cached position/type access with CUDA
UCL_Texture neigh_tex;
/// Use a heuristic to approximate best bin size assuming uniform density
/** This is only called by core LAMMPS for atom sort sizes **/
inline double update_cell_size(const double subx, const double suby,
const double subz, const int nlocal,
const double cut) {
if (_auto_cell_size==false || subz==0.0) return cut;
else {
_cell_size=best_cell_size(subx, suby, subz, nlocal, cut);
_cached_cell_size=true;
_cut_sort=cut;
return _cell_size;
}
}
/// Use a heuristic to approximate best bin size assuming uniform density
double best_cell_size(const double subx, const double suby,
const double subz, const int nlocal,
const double cut);
/// Current cutoff used for cell size determination
inline double neighbor_cutoff() { return _neighbor_cutoff; }
/// Current neighbor cell size
inline double cell_size() { return _cell_size; }
/// Return setting for auto cell size
inline bool auto_cell_size() { return _auto_cell_size; }
inline void setup_auto_cell_size(const bool autosize, const double cut,
const int simd_size) {
_auto_cell_size = autosize;
_cached_cell_size = false;
_neighbor_cutoff = cut;
_cell_size = cut;
_simd_size = simd_size;
if (_simd_size < 2) _auto_cell_size = false;
}
/// Compile kernels for neighbor lists
void compile_kernels(UCL_Device &dev, const int gpu_nbor,
const std::string flags);
@ -59,6 +97,8 @@ class NeighborShared {
private:
bool _compiled;
int _gpu_nbor;
bool _auto_cell_size, _cached_cell_size;
double _neighbor_cutoff, _cell_size, _simd_size, _cut_sort;
};
}