MCPcopy Create free account
hub / github.com/Meshcapade/difflocks / fromEigen

Function fromEigen

extensions/include/cuMat/src/Matrix.h:922–928  ·  view source on GitHub ↗

* \brief Converts the specified Eigen matrix into the * corresponding cuMat matrix. * Note that Eigen does not support batched matrices. Hence, this * conversion is only possible, if * a) the target matrix has a compile-time batch size of 1, or * b) the target matrix has a dynamic batch size and the batch size is 1 during runtime. * A new cuMat matrix is returned. * * * De

Source from the content-addressed store, hash-verified

920 * \return the Eigen matrix with the contents of this matrix.
921 */
922 static Type fromEigen(const EigenMatrix_t& mat)
923 {
924 CUMAT_STATIC_ASSERT(_Batches == 1 || _Batches == Dynamic, "Compile-time batches>1 not allowed. Eigen does not support batches");
925 Type m(mat.rows(), mat.cols());
926 m.copyFromHost(reinterpret_cast<const _Scalar*>(mat.data()));
927 return m;
928 }
929
930#endif
931

Callers

nothing calls this directly

Calls 3

rowsMethod · 0.45
colsMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected