|Re: [eigen] When to mark EIGEN_DEVICE_FUNC|
[ Thread Index |
| More lists.tuxfamily.org/eigen Archives
By "dynamic memory allocation", do you mean something like
dynamic matrix multiplication which produces temp?
By the way, can EIGEN_DEVICE_FUNC functions call
non-EIGEN_DEVICE_FUNC functions? (I guess no.)
MatrixXd foo(const MatrixXd& A, const MatrixXd& B)
return A * A.transpose() + B * B.transpose();
Can this function be marked as EIGEN_DEVICE_FUNC?
On Tue, Jan 13, 2015 at 09:29:38, Gael Guennebaud wrote:
> the idea is to declare all functions/methods with EIGEN_DEVICE_FUNC except
> the ones that potentially lead to non CUDA compatible code. Typically, this
> includes dynamic memory allocation and paths designed for large matrices.
> On Tue, Jan 13, 2015 at 6:28 AM, Chen-Pang He <jdh8@xxxxxxxxxxxxxx> wrote:
> > Recently, I got 2 nvidia cards to write some CUDA. I need help
> > to determine what functions should be qualified with
> > EIGEN_DEVICE_FUNC and what should not. Is there a rule of thumb?
> > Thanks,
> > Chen-Pang