remove buffer and view cpu support

This commit is contained in:
Tobias Meyer Andersen 2025-01-08 08:53:16 +01:00
parent b48479b7e4
commit 486f7cc819
2 changed files with 0 additions and 32 deletions

View File

@ -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
}
/**

View File

@ -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
}
/**