Re: [eigen] When to mark EIGEN_DEVICE_FUNC |
[ Thread Index | Date 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.)
For example,
MatrixXd foo(const MatrixXd& A, const MatrixXd& B)
{
return A * A.transpose() + B * B.transpose();
}
Can this function be marked as EIGEN_DEVICE_FUNC?
Thanks again,
Chen-Pang
On Tue, Jan 13, 2015 at 09:29:38, Gael Guennebaud wrote:
> Hi,
>
> 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.
>
> cheers,
> gael
>
> 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
Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |