Lines Matching refs:helper
154 ReductionHelper helper;
155 OP_REQUIRES_OK(ctx, helper.Simplify(data, axes, keep_dims_));
156 CHECK_GE(helper.ndims(), 0);
158 if (helper.ndims() == 0 ||
159 (helper.ndims() == 1 && !helper.reduce_first_axis())) {
164 if (!out.CopyFrom(data, helper.out_shape())) {
180 helper.out_reshape(), &tmp_out, alloc_attr));
195 } else if ((helper.ndims() == 1) && helper.reduce_first_axis()) {
197 Functor::Reduce(ctx, helper.out<T, 0>(&tmp_out), helper.in<T, 1>(data),
199 } else if ((helper.ndims() == 2) && helper.reduce_first_axis()) {
201 Functor::Reduce(ctx, helper.out<T, 1>(&tmp_out), helper.in<T, 2>(data),
203 } else if ((helper.ndims() == 2) && !helper.reduce_first_axis()) {
205 Functor::Reduce(ctx, helper.out<T, 1>(&tmp_out), helper.in<T, 2>(data),
207 } else if ((helper.ndims() == 3) && helper.reduce_first_axis()) {
210 Functor::Reduce(ctx, helper.out<T, 1>(&tmp_out), helper.in<T, 3>(data),
212 } else if ((helper.ndims() == 3) && !helper.reduce_first_axis()) {
214 Functor::Reduce(ctx, helper.out<T, 2>(&tmp_out), helper.in<T, 3>(data),
220 CHECK(data_reshaped.CopyFrom(data, helper.data_reshape()));
223 helper.shuffled_shape(), &shuffled,
226 ctx, DoTranspose(d, data_reshaped, helper.permutation(), &shuffled));
239 if (!out.CopyFrom(tmp_out, helper.out_shape())) {