added gpu wrapper test
This commit is contained in:
parent
288d62b824
commit
147f0b9d15
|
@ -1196,6 +1196,7 @@ void testCommDup( UnitTest *ut )
|
|||
}
|
||||
|
||||
class gpuWrapper{
|
||||
public:
|
||||
gpuWrapper(MPI_CLASS MPI_COMM, int MSG_SIZE);
|
||||
~gpuWrapper();
|
||||
void Send(double *values);
|
||||
|
@ -1224,6 +1225,11 @@ gpuWrapper::gpuWrapper(MPI_CLASS MPI_COMM, int MSG_SIZE){
|
|||
if (!(rank_X < nprocs)) rank_X = 0;
|
||||
}
|
||||
|
||||
gpuWrapper::~gpuWrapper(){
|
||||
ScaLBL_FreeDeviceMemory(sendbuf);
|
||||
ScaLBL_FreeDeviceMemory(recvbuf);
|
||||
}
|
||||
|
||||
void gpuWrapper::Send(double *values){
|
||||
sendtag = recvtag = 130;
|
||||
ScaLBL_CopyToDevice(sendbuf,values,sendCount*sizeof(double));
|
||||
|
|
Loading…
Reference in New Issue
Block a user