1
0
mirror of https://github.com/paboyle/Grid.git synced 2024-11-10 07:55:35 +00:00

Add AdviseInfrequentUse

This commit is contained in:
Christoph Lehner 2020-05-02 11:38:42 -04:00
parent c8af498a2a
commit 63cf201ee7

View File

@ -9,6 +9,7 @@ Copyright (C) 2015
Author: Azusa Yamaguchi <ayamaguc@staffmail.ed.ac.uk>
Author: Peter Boyle <paboyle@ph.ed.ac.uk>
Author: paboyle <paboyle@ph.ed.ac.uk>
Author: Christoph Lehner <christoph@lhnr.de>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -75,6 +76,14 @@ public:
if (grid) conformable(grid, _grid);
else grid = _grid;
};
// Advise that the data is used infrequently. This can
// significantly influence performance of bulk storage.
accelerator_inline void AdviseInfrequentUse() {
#ifdef __CUDA_ARCH__
cudaMemAdvise(_odata,_odata_size*sizeof(vobj),cudaMemAdviseSetPreferredLocation,cudaCpuDeviceId);
#endif
};
};
/////////////////////////////////////////////////////////////////////////////////////////