mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-14 04:35:57 +08:00
Avoid an unnecessary copy of the evaluator.
This commit is contained in:
parent
f953c60705
commit
a278414d1b
@ -183,7 +183,7 @@ class TensorExecutor<Expression, GpuDevice, Vectorizable> {
|
|||||||
template <typename Evaluator, typename Index, bool Vectorizable>
|
template <typename Evaluator, typename Index, bool Vectorizable>
|
||||||
struct EigenMetaKernelEval {
|
struct EigenMetaKernelEval {
|
||||||
static __device__ EIGEN_ALWAYS_INLINE
|
static __device__ EIGEN_ALWAYS_INLINE
|
||||||
void run(Evaluator eval, Index first, Index last, Index step_size) {
|
void run(Evaluator& eval, Index first, Index last, Index step_size) {
|
||||||
for (Index i = first; i < last; i += step_size) {
|
for (Index i = first; i < last; i += step_size) {
|
||||||
eval.evalScalar(i);
|
eval.evalScalar(i);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user