Fiw shadowing of last and all

This commit is contained in:
Gael Guennebaud
2018-09-21 23:02:33 +02:00
parent e3c8289047
commit c696dbcaa6
6 changed files with 59 additions and 59 deletions

View File

@@ -208,8 +208,8 @@ __global__ void ReductionInitFullReduxKernelHalfFloat(Reducer reducer, const Sel
eigen_assert(blockDim.x == 1);
eigen_assert(gridDim.x == 1);
if (num_coeffs % 2 != 0) {
half last = input.m_impl.coeff(num_coeffs-1);
*scratch = __halves2half2(last, reducer.initialize());
half lastCoeff = input.m_impl.coeff(num_coeffs-1);
*scratch = __halves2half2(lastCoeff, reducer.initialize());
} else {
*scratch = reducer.template initializePacket<half2>();
}