* \brief Converts this cuMat matrix to the corresponding Eigen matrix. * Note that Eigen does not support batched matrices. Hence, this * conversion is only possible, if * a) the matrix has a compile-time batch size of 1, or * b) the matrix has a dynamic batch size and the batch size is 1 during runtime. * * * Design decision: * Converting between cuMat and Eigen
| 889 | * \return the Eigen matrix with the contents of this matrix. |
| 890 | */ |
| 891 | EigenMatrix_t toEigen() const |
| 892 | { |
| 893 | CUMAT_STATIC_ASSERT(_Batches == 1 || _Batches == Dynamic, "Compile-time batches>1 not allowed. Eigen does not support batches"); |
| 894 | if (_Batches == Dynamic) CUMAT_ASSERT_ARGUMENT(batches() == 1); |
| 895 | EigenMatrix_t mat(rows(), cols()); |
| 896 | copyToHost(mat.data()); |
| 897 | return mat; |
| 898 | } |
| 899 | |
| 900 | /** |
| 901 | * \brief Converts the specified Eigen matrix into the |
nothing calls this directly
no test coverage detected