Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion Common/include/linear_algebra/CMatrixVectorProduct.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,11 @@ class CSysMatrixVectorProduct final : public CMatrixVectorProduct<ScalarType> {
*/
inline CSysMatrixVectorProduct(const CSysMatrix<ScalarType>& matrix_ref, CGeometry* geometry_ref,
const CConfig* config_ref)
: matrix(matrix_ref), geometry(geometry_ref), config(config_ref) {}
: matrix(matrix_ref), geometry(geometry_ref), config(config_ref) {
#ifdef HAVE_CUDA
if (config->GetCUDA()) matrix.HtDTransfer();
#endif
}

/*!
* \note This class cannot be default constructed as that would leave us with invalid pointers.
Expand Down
1 change: 0 additions & 1 deletion Common/src/linear_algebra/CSysMatrixGPU.cu
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ void CSysMatrix<ScalarType>::GPUMatrixVectorProduct(const CSysVector<ScalarType>
ScalarType* d_vec = vec.GetDevicePointer();
ScalarType* d_prod = prod.GetDevicePointer();

HtDTransfer();
vec.HtDTransfer();
prod.GPUSetVal(0.0);

Expand Down
Loading