diff --git a/src/TNL/Matrices/Matrix_impl.h b/src/TNL/Matrices/Matrix_impl.h
index 1efdd2447f5fef3dd1edc9066c0b3f004a744ee1..442de90283bd6859098456286e74d4d24c29a0a1 100644
--- a/src/TNL/Matrices/Matrix_impl.h
+++ b/src/TNL/Matrices/Matrix_impl.h
@@ -140,6 +140,19 @@ bool Matrix< Real, Device, Index >::operator != ( const MatrixT& matrix ) const
    return ! operator == ( matrix );
 }
 
+template< typename Real,
+          typename Device,
+          typename Index >
+void
+Matrix< Real, Device, Index >::
+copyFromHostToCuda( Matrix< Real, Devices::Host, Index >& matrix )
+{
+    this->numberOfColors = matrix.getNumberOfColors();
+    this->columns = matrix.getColumns();
+    this->rows = matrix.getRows();
+
+    this->values.setSize( matrix.getValuesSize() );
+}
 
 template< typename Real,
           typename Device,