You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When constructing a matrix_cl from Eigen::Map it creates a copy of the data by calling .eval(). Instead of this the data in Map should be directly accessed.
When constructing a matrix_cl from a rvalue (temporary object), it uses blocking calls to OpenCL to avoid accessing these objects after they are destroyed. Instead these objects could be moved (or evaluated in case of Eigen expressions) on heap and deleted after the copy to OpenCL device is complete.
Example
int rows, cols;
double* data;
Eigen::Map<Eigen::MatrixXd> map(data, rows, cols);
matrix_cl(map);
Eigen::MatrixXd a, b;
matrix_cl(a + b);
Expected Output
Constructing matrix_cl from a Map is faster. Constructing matrix_cl from a temporary does not block.
Activity