remove last two unneeded size t conversions

This commit is contained in:
Tobias Meyer Andersen
2024-08-05 13:12:35 +02:00
parent 62ee7bf495
commit 30013ea9d0

View File

@@ -86,13 +86,13 @@ CuBuffer<T>::resize(size_t newSize)
} }
// Allocate memory for the new buffer // Allocate memory for the new buffer
T* tmpBuffer = nullptr; T* tmpBuffer = nullptr;
OPM_CUDA_SAFE_CALL(cudaMalloc(&tmpBuffer, sizeof(T) * detail::to_size_t(newSize))); OPM_CUDA_SAFE_CALL(cudaMalloc(&tmpBuffer, sizeof(T) * newSize));
// Move the data from the old to the new buffer with truncation // Move the data from the old to the new buffer with truncation
size_t sizeOfMove = std::min({m_numberOfElements, newSize}); size_t sizeOfMove = std::min({m_numberOfElements, newSize});
OPM_CUDA_SAFE_CALL(cudaMemcpy(tmpBuffer, OPM_CUDA_SAFE_CALL(cudaMemcpy(tmpBuffer,
m_dataOnDevice, m_dataOnDevice,
detail::to_size_t(sizeOfMove) * sizeof(T), sizeOfMove * sizeof(T),
cudaMemcpyDeviceToDevice)); cudaMemcpyDeviceToDevice));
// free the old buffer // free the old buffer