mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
remove buffer and view cpu support
This commit is contained in:
parent
b48479b7e4
commit
486f7cc819
@ -127,11 +127,7 @@ public:
|
||||
#ifndef NDEBUG
|
||||
assertHasElements();
|
||||
#endif
|
||||
#if OPM_IS_INSIDE_DEVICE_FUNCTION
|
||||
return m_dataOnDevice[0];
|
||||
#else
|
||||
assert(false && "Getting a reference to a value in a GPUBuffer is not allowed in CPU code");
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
@ -142,11 +138,7 @@ public:
|
||||
#ifndef NDEBUG
|
||||
assertHasElements();
|
||||
#endif
|
||||
#if OPM_IS_INSIDE_DEVICE_FUNCTION
|
||||
return m_dataOnDevice[m_numberOfElements-1];
|
||||
#else
|
||||
assert(false && "Getting a reference to a value in a GPUBuffer is not allowed in CPU code");
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
@ -157,13 +149,7 @@ public:
|
||||
#ifndef NDEBUG
|
||||
assertHasElements();
|
||||
#endif
|
||||
#if OPM_IS_INSIDE_DEVICE_FUNCTION
|
||||
return m_dataOnDevice[0];
|
||||
#else
|
||||
T value;
|
||||
cudaMemcpy(&value, &m_dataOnDevice[0], sizeof(T), cudaMemcpyDeviceToHost);
|
||||
return value;
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
@ -174,13 +160,7 @@ public:
|
||||
#ifndef NDEBUG
|
||||
assertHasElements();
|
||||
#endif
|
||||
#if OPM_IS_INSIDE_DEVICE_FUNCTION
|
||||
return m_dataOnDevice[m_numberOfElements-1];
|
||||
#else
|
||||
T value;
|
||||
cudaMemcpy(&value, &m_dataOnDevice[m_numberOfElements - 1], sizeof(T), cudaMemcpyDeviceToHost);
|
||||
return value;
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -151,13 +151,7 @@ public:
|
||||
#ifndef NDEBUG
|
||||
assertHasElements();
|
||||
#endif
|
||||
#if OPM_IS_INSIDE_DEVICE_FUNCTION
|
||||
return m_dataPtr[0];
|
||||
#else
|
||||
T value;
|
||||
cudaMemcpy(&value, &m_dataPtr[0], sizeof(T), cudaMemcpyDeviceToHost);
|
||||
return value;
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
@ -168,13 +162,7 @@ public:
|
||||
#ifndef NDEBUG
|
||||
assertHasElements();
|
||||
#endif
|
||||
#if OPM_IS_INSIDE_DEVICE_FUNCTION
|
||||
return m_dataPtr[m_numberOfElements-1];
|
||||
#else
|
||||
T value;
|
||||
cudaMemcpy(&value, &m_dataPtr[m_numberOfElements - 1], sizeof(T), cudaMemcpyDeviceToHost);
|
||||
return value;
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user