2021-02-01 13:31:45 +01:00
|
|
|
/* ******************************************************************************
|
|
|
|
*
|
2019-06-06 14:21:15 +02:00
|
|
|
*
|
|
|
|
* This program and the accompanying materials are made available under the
|
|
|
|
* terms of the Apache License, Version 2.0 which is available at
|
|
|
|
* https://www.apache.org/licenses/LICENSE-2.0.
|
|
|
|
*
|
2021-02-01 13:31:45 +01:00
|
|
|
* See the NOTICE file distributed with this work for additional
|
|
|
|
* information regarding copyright ownership.
|
2019-06-06 14:21:15 +02:00
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
|
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
|
|
* License for the specific language governing permissions and limitations
|
|
|
|
* under the License.
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
******************************************************************************/
|
|
|
|
|
|
|
|
//
|
|
|
|
// @author Yurii Shyrma (iuriish@yahoo.com), created on 14.03.2019
|
|
|
|
//
|
|
|
|
|
|
|
|
#include <helpers/Loops.h>
|
|
|
|
|
|
|
|
using namespace simdOps;
|
|
|
|
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
2019-08-27 09:37:10 +02:00
|
|
|
template <typename X, typename Z>
|
2019-06-06 14:21:15 +02:00
|
|
|
template <typename OpType>
|
2020-05-09 07:06:14 +02:00
|
|
|
void sd::IndexReductionLoops<X,Z>::loopIndexReduce(const X* x, const Nd4jLong* xShapeInfo,
|
|
|
|
Z* z, const Nd4jLong* zShapeInfo,
|
|
|
|
const Nd4jLong* tadShapeInfo, const Nd4jLong* tadOffsets,
|
|
|
|
X* extraParams) {
|
2019-06-06 14:21:15 +02:00
|
|
|
|
2020-03-02 10:49:41 +01:00
|
|
|
sd::LoopKind::Kind kindOfLoop = sd::LoopKind::deduceKindOfLoopTadXZ(xShapeInfo, zShapeInfo, tadShapeInfo);
|
|
|
|
if(kindOfLoop == sd::LoopKind::SMALLARR2DX)
|
|
|
|
kindOfLoop = sd::LoopKind::EWSNONZERO;
|
2019-06-06 14:21:15 +02:00
|
|
|
|
|
|
|
const Nd4jLong zLen = shape::length(zShapeInfo);
|
|
|
|
const Nd4jLong tadLen = shape::length(tadShapeInfo);
|
|
|
|
|
|
|
|
const uint tadEws = shape::elementWiseStride(tadShapeInfo);
|
|
|
|
const uint zEws = shape::elementWiseStride(zShapeInfo);
|
|
|
|
|
|
|
|
const Nd4jLong* tadShape = shape::shapeOf(const_cast<Nd4jLong*>(tadShapeInfo));
|
|
|
|
const Nd4jLong* tadStride = shape::stride(const_cast<Nd4jLong*>(tadShapeInfo));
|
|
|
|
|
|
|
|
switch (kindOfLoop) {
|
|
|
|
//*********************************************//
|
2020-03-02 10:49:41 +01:00
|
|
|
case sd::LoopKind::EWS1: {
|
2019-06-06 14:21:15 +02:00
|
|
|
|
2019-11-13 15:15:18 +01:00
|
|
|
auto func = PRAGMA_THREADS_FOR {
|
2020-02-20 09:43:26 +01:00
|
|
|
for (auto i = start; i < stop; i++) {
|
2019-11-13 15:15:18 +01:00
|
|
|
auto tad = const_cast<X *>(x) + tadOffsets[i];
|
|
|
|
auto indexValue = OpType::startingIndexValue(tad);
|
2019-06-06 14:21:15 +02:00
|
|
|
|
2020-02-28 15:04:45 +01:00
|
|
|
for (Nd4jLong j = 0; j < tadLen; j++) {
|
2019-11-13 15:15:18 +01:00
|
|
|
functions::indexreduce::IndexValue<X> comp(tad[j], j);
|
|
|
|
indexValue = OpType::update(indexValue, comp, extraParams);
|
|
|
|
}
|
|
|
|
|
|
|
|
z[i] = (Z) indexValue.index;
|
2019-06-06 14:21:15 +02:00
|
|
|
}
|
2019-11-13 15:15:18 +01:00
|
|
|
};
|
2019-06-06 14:21:15 +02:00
|
|
|
|
2020-03-09 06:22:49 +01:00
|
|
|
samediff::Threads::parallel_tad(func, 0, zLen);
|
2019-06-06 14:21:15 +02:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
//*********************************************//
|
2020-03-02 10:49:41 +01:00
|
|
|
case sd::LoopKind::EWSNONZERO: {
|
2019-06-06 14:21:15 +02:00
|
|
|
|
2019-11-13 15:15:18 +01:00
|
|
|
auto func = PRAGMA_THREADS_FOR {
|
2020-02-20 09:43:26 +01:00
|
|
|
for (auto i = start; i < stop; i++) {
|
2019-11-13 15:15:18 +01:00
|
|
|
auto tad = const_cast<X *>(x) + tadOffsets[i];
|
|
|
|
auto indexValue = OpType::startingIndexValue(tad);
|
|
|
|
|
2020-02-28 15:04:45 +01:00
|
|
|
for (Nd4jLong j = 0; j < tadLen; j++) {
|
2019-11-13 15:15:18 +01:00
|
|
|
functions::indexreduce::IndexValue<X> comp(tad[j * tadEws], j);
|
|
|
|
indexValue = OpType::update(indexValue, comp, extraParams);
|
|
|
|
}
|
2019-06-06 14:21:15 +02:00
|
|
|
|
2019-11-13 15:15:18 +01:00
|
|
|
z[i * zEws] = (Z) indexValue.index;
|
2019-06-06 14:21:15 +02:00
|
|
|
}
|
2019-11-13 15:15:18 +01:00
|
|
|
};
|
2019-06-06 14:21:15 +02:00
|
|
|
|
2020-03-09 06:22:49 +01:00
|
|
|
samediff::Threads::parallel_tad(func, 0, zLen);
|
2019-06-06 14:21:15 +02:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
//*********************************************//
|
2020-03-02 10:49:41 +01:00
|
|
|
case sd::LoopKind::RANK1: {
|
2019-06-06 14:21:15 +02:00
|
|
|
|
2019-11-13 15:15:18 +01:00
|
|
|
auto func = PRAGMA_THREADS_FOR {
|
2020-02-20 09:43:26 +01:00
|
|
|
for (auto i = start; i < stop; i++) {
|
2019-11-13 15:15:18 +01:00
|
|
|
auto tad = const_cast<X *>(x) + tadOffsets[i];
|
|
|
|
auto indexValue = OpType::startingIndexValue(tad);
|
|
|
|
|
2020-02-28 15:04:45 +01:00
|
|
|
for (Nd4jLong i0 = 0; i0 < tadLen; ++i0) {
|
2019-11-13 15:15:18 +01:00
|
|
|
functions::indexreduce::IndexValue<X> comp(tad[i0 * tadStride[0]], i0);
|
|
|
|
indexValue = OpType::update(indexValue, comp, extraParams);
|
|
|
|
}
|
2019-06-06 14:21:15 +02:00
|
|
|
|
2019-11-13 15:15:18 +01:00
|
|
|
z[i] = (Z) indexValue.index;
|
2019-06-06 14:21:15 +02:00
|
|
|
}
|
2019-11-13 15:15:18 +01:00
|
|
|
};
|
2019-06-06 14:21:15 +02:00
|
|
|
|
2020-03-09 06:22:49 +01:00
|
|
|
samediff::Threads::parallel_tad(func, 0, zLen);
|
2019-06-06 14:21:15 +02:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
//*********************************************//
|
2020-03-02 10:49:41 +01:00
|
|
|
case sd::LoopKind::RANK2: {
|
2019-06-06 14:21:15 +02:00
|
|
|
Nd4jLong newStride[2];
|
|
|
|
shape::updateStrides(2, tadShape, newStride, 'c');
|
|
|
|
|
2019-11-13 15:15:18 +01:00
|
|
|
auto func = PRAGMA_THREADS_FOR {
|
2020-02-20 09:43:26 +01:00
|
|
|
for (auto i = start; i < stop; i++) {
|
2019-11-13 15:15:18 +01:00
|
|
|
auto tad = const_cast<X *>(x) + tadOffsets[i];
|
|
|
|
auto indexValue = OpType::startingIndexValue(tad);
|
2019-06-06 14:21:15 +02:00
|
|
|
|
2020-02-28 15:04:45 +01:00
|
|
|
for (Nd4jLong i0 = 0; i0 < tadShape[0]; ++i0) {
|
|
|
|
for (Nd4jLong i1 = 0; i1 < tadShape[1]; ++i1) {
|
2019-11-13 15:15:18 +01:00
|
|
|
const auto tadOffset = i0 * tadStride[0] + i1 * tadStride[1];
|
|
|
|
const auto tadIndex = i0 * newStride[0] + i1;
|
|
|
|
functions::indexreduce::IndexValue<X> comp(tad[tadOffset], tadIndex);
|
|
|
|
indexValue = OpType::update(indexValue, comp, extraParams);
|
|
|
|
}
|
2019-06-06 14:21:15 +02:00
|
|
|
}
|
2019-11-13 15:15:18 +01:00
|
|
|
|
|
|
|
z[i] = (Z) indexValue.index;
|
2019-06-06 14:21:15 +02:00
|
|
|
}
|
2019-11-13 15:15:18 +01:00
|
|
|
};
|
2019-06-06 14:21:15 +02:00
|
|
|
|
2020-03-09 06:22:49 +01:00
|
|
|
samediff::Threads::parallel_tad(func, 0, zLen);
|
2019-06-06 14:21:15 +02:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
//*********************************************//
|
2020-03-02 10:49:41 +01:00
|
|
|
case sd::LoopKind::RANK3: {
|
2019-06-06 14:21:15 +02:00
|
|
|
Nd4jLong newStride[3];
|
|
|
|
shape::updateStrides(3, tadShape, newStride, 'c');
|
|
|
|
|
2019-11-13 15:15:18 +01:00
|
|
|
auto func = PRAGMA_THREADS_FOR {
|
2020-02-20 09:43:26 +01:00
|
|
|
for (auto i = start; i < stop; i++) {
|
2019-11-13 15:15:18 +01:00
|
|
|
auto tad = const_cast<X *>(x) + tadOffsets[i];
|
|
|
|
auto indexValue = OpType::startingIndexValue(tad);
|
2019-06-06 14:21:15 +02:00
|
|
|
|
2020-02-28 15:04:45 +01:00
|
|
|
for (Nd4jLong i0 = 0; i0 < tadShape[0]; ++i0) {
|
|
|
|
for (Nd4jLong i1 = 0; i1 < tadShape[1]; ++i1) {
|
|
|
|
for (Nd4jLong i2 = 0; i2 < tadShape[2]; ++i2) {
|
2019-11-13 15:15:18 +01:00
|
|
|
const auto tadOffset = i0 * tadStride[0] + i1 * tadStride[1] + i2 * tadStride[2];
|
|
|
|
const auto tadIndex = i0 * newStride[0] + i1 * newStride[1] + i2;
|
|
|
|
functions::indexreduce::IndexValue<X> comp(tad[tadOffset], tadIndex);
|
|
|
|
indexValue = OpType::update(indexValue, comp, extraParams);
|
|
|
|
}
|
2019-06-06 14:21:15 +02:00
|
|
|
}
|
|
|
|
}
|
2019-11-13 15:15:18 +01:00
|
|
|
|
|
|
|
z[i] = (Z) indexValue.index;
|
2019-06-06 14:21:15 +02:00
|
|
|
}
|
2019-11-13 15:15:18 +01:00
|
|
|
};
|
2019-06-06 14:21:15 +02:00
|
|
|
|
2020-03-09 06:22:49 +01:00
|
|
|
samediff::Threads::parallel_tad(func, 0, zLen);
|
2019-06-06 14:21:15 +02:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
//*********************************************//
|
2020-03-02 10:49:41 +01:00
|
|
|
case sd::LoopKind::RANK4: {
|
2019-06-06 14:21:15 +02:00
|
|
|
Nd4jLong newStride[4];
|
|
|
|
shape::updateStrides(4, tadShape, newStride, 'c');
|
|
|
|
|
2019-11-13 15:15:18 +01:00
|
|
|
auto func = PRAGMA_THREADS_FOR {
|
2020-02-20 09:43:26 +01:00
|
|
|
for (auto i = start; i < stop; i++) {
|
2019-11-13 15:15:18 +01:00
|
|
|
auto tad = const_cast<X *>(x) + tadOffsets[i];
|
|
|
|
auto indexValue = OpType::startingIndexValue(tad);
|
|
|
|
|
2020-02-28 15:04:45 +01:00
|
|
|
for (Nd4jLong i0 = 0; i0 < tadShape[0]; ++i0) {
|
|
|
|
for (Nd4jLong i1 = 0; i1 < tadShape[1]; ++i1) {
|
|
|
|
for (Nd4jLong i2 = 0; i2 < tadShape[2]; ++i2) {
|
|
|
|
for (Nd4jLong i3 = 0; i3 < tadShape[3]; ++i3) {
|
2019-11-13 15:15:18 +01:00
|
|
|
const auto tadOffset = i0 * tadStride[0] + i1 * tadStride[1] + i2 * tadStride[2] + i3 * tadStride[3];
|
|
|
|
const auto tadIndex = i0 * newStride[0] + i1 * newStride[1] + i2 * newStride[2] + i3;
|
|
|
|
functions::indexreduce::IndexValue<X> comp(tad[tadOffset], tadIndex);
|
|
|
|
indexValue = OpType::update(indexValue, comp, extraParams);
|
|
|
|
}
|
2019-06-06 14:21:15 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2019-11-13 15:15:18 +01:00
|
|
|
|
|
|
|
z[i] = (Z) indexValue.index;
|
2019-06-06 14:21:15 +02:00
|
|
|
}
|
2019-11-13 15:15:18 +01:00
|
|
|
};
|
2019-06-06 14:21:15 +02:00
|
|
|
|
2020-03-09 06:22:49 +01:00
|
|
|
samediff::Threads::parallel_tad(func, 0, zLen);
|
2019-06-06 14:21:15 +02:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
//*********************************************//
|
2020-03-02 10:49:41 +01:00
|
|
|
case sd::LoopKind::RANK5: {
|
2019-06-06 14:21:15 +02:00
|
|
|
Nd4jLong newStride[5];
|
|
|
|
shape::updateStrides(5, tadShape, newStride, 'c');
|
|
|
|
|
2019-11-13 15:15:18 +01:00
|
|
|
auto func = PRAGMA_THREADS_FOR {
|
2020-02-20 09:43:26 +01:00
|
|
|
for (auto i = start; i < stop; i++) {
|
2019-11-13 15:15:18 +01:00
|
|
|
auto tad = const_cast<X *>(x) + tadOffsets[i];
|
|
|
|
auto indexValue = OpType::startingIndexValue(tad);
|
|
|
|
|
2020-02-28 15:04:45 +01:00
|
|
|
for (Nd4jLong i0 = 0; i0 < tadShape[0]; ++i0) {
|
|
|
|
for (Nd4jLong i1 = 0; i1 < tadShape[1]; ++i1) {
|
|
|
|
for (Nd4jLong i2 = 0; i2 < tadShape[2]; ++i2) {
|
|
|
|
for (Nd4jLong i3 = 0; i3 < tadShape[3]; ++i3) {
|
|
|
|
for (Nd4jLong i4 = 0; i4 < tadShape[4]; ++i4) {
|
2019-11-13 15:15:18 +01:00
|
|
|
const auto tadOffset = i0 * tadStride[0] + i1 * tadStride[1] + i2 * tadStride[2] + i3 * tadStride[3] + i4 * tadStride[4];
|
|
|
|
const auto tadIndex = i0 * newStride[0] + i1 * newStride[1] + i2 * newStride[2] + i3 * newStride[3] + i4;
|
|
|
|
functions::indexreduce::IndexValue<X> comp(tad[tadOffset], tadIndex);
|
|
|
|
indexValue = OpType::update(indexValue, comp, extraParams);
|
|
|
|
}
|
2019-06-06 14:21:15 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2019-11-13 15:15:18 +01:00
|
|
|
|
|
|
|
z[i] = (Z) indexValue.index;
|
2019-06-06 14:21:15 +02:00
|
|
|
}
|
2019-11-13 15:15:18 +01:00
|
|
|
};
|
2019-06-06 14:21:15 +02:00
|
|
|
|
2020-03-09 06:22:49 +01:00
|
|
|
samediff::Threads::parallel_tad(func, 0, zLen);
|
2019-06-06 14:21:15 +02:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
//*********************************************//
|
2020-03-02 10:49:41 +01:00
|
|
|
case sd::LoopKind::X_EWSNONZERO: {
|
2019-06-06 14:21:15 +02:00
|
|
|
uint castZShapeInfo[MAX_RANK];
|
2020-03-02 10:49:41 +01:00
|
|
|
const bool canCastZ = sd::DataTypeUtils::castShapeInfo<uint>(zShapeInfo, castZShapeInfo);
|
2019-06-06 14:21:15 +02:00
|
|
|
|
2019-11-13 15:15:18 +01:00
|
|
|
auto func = PRAGMA_THREADS_FOR {
|
2020-02-20 09:43:26 +01:00
|
|
|
for (auto i = start; i < stop; i++) {
|
2019-11-13 15:15:18 +01:00
|
|
|
auto tad = const_cast<X *>(x) + tadOffsets[i];
|
|
|
|
auto indexValue = OpType::startingIndexValue(tad);
|
2019-06-06 14:21:15 +02:00
|
|
|
|
2020-02-28 15:04:45 +01:00
|
|
|
for (Nd4jLong j = 0; j < tadLen; j++) {
|
2019-11-13 15:15:18 +01:00
|
|
|
functions::indexreduce::IndexValue<X> comp(tad[j * tadEws], j);
|
|
|
|
indexValue = OpType::update(indexValue, comp, extraParams);
|
|
|
|
}
|
|
|
|
|
|
|
|
auto zOffset = shape::indexOffset(i, zShapeInfo, castZShapeInfo, canCastZ);
|
|
|
|
z[zOffset] = (Z) indexValue.index;
|
2019-06-06 14:21:15 +02:00
|
|
|
}
|
2019-11-13 15:15:18 +01:00
|
|
|
};
|
2019-06-06 14:21:15 +02:00
|
|
|
|
2020-03-09 06:22:49 +01:00
|
|
|
samediff::Threads::parallel_tad(func, 0, zLen);
|
2019-06-06 14:21:15 +02:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
//*********************************************//
|
2020-03-02 10:49:41 +01:00
|
|
|
case sd::LoopKind::Z_EWSNONZERO: {
|
2019-06-06 14:21:15 +02:00
|
|
|
uint castTadShapeInfo[MAX_RANK];
|
2020-03-02 10:49:41 +01:00
|
|
|
const bool canCastTad = sd::DataTypeUtils::castShapeInfo<uint>(tadShapeInfo, castTadShapeInfo);
|
2019-06-06 14:21:15 +02:00
|
|
|
|
2019-11-13 15:15:18 +01:00
|
|
|
auto func = PRAGMA_THREADS_FOR {
|
2020-02-20 09:43:26 +01:00
|
|
|
for (auto i = start; i < stop; i++) {
|
2019-11-13 15:15:18 +01:00
|
|
|
auto tad = const_cast<X *>(x) + tadOffsets[i];
|
|
|
|
auto indexValue = OpType::startingIndexValue(tad);
|
2019-06-06 14:21:15 +02:00
|
|
|
|
2020-02-28 15:04:45 +01:00
|
|
|
for (Nd4jLong j = 0; j < tadLen; j++) {
|
2019-11-13 15:15:18 +01:00
|
|
|
auto tadOffset = shape::indexOffset(j, tadShapeInfo, castTadShapeInfo, canCastTad);
|
|
|
|
functions::indexreduce::IndexValue<X> comp(tad[tadOffset], j);
|
|
|
|
indexValue = OpType::update(indexValue, comp, extraParams);
|
|
|
|
}
|
|
|
|
|
|
|
|
z[i * zEws] = (Z) indexValue.index;
|
2019-06-06 14:21:15 +02:00
|
|
|
}
|
2019-11-13 15:15:18 +01:00
|
|
|
};
|
2019-06-06 14:21:15 +02:00
|
|
|
|
2020-03-09 06:22:49 +01:00
|
|
|
samediff::Threads::parallel_tad(func, 0, zLen);
|
2019-06-06 14:21:15 +02:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
//*********************************************//
|
|
|
|
default: {
|
|
|
|
uint castTadShapeInfo[MAX_RANK];
|
|
|
|
uint castZShapeInfo[MAX_RANK];
|
2020-03-02 10:49:41 +01:00
|
|
|
const bool canCastTad = sd::DataTypeUtils::castShapeInfo<uint>(tadShapeInfo, castTadShapeInfo);
|
|
|
|
const bool canCastZ = sd::DataTypeUtils::castShapeInfo<uint>(zShapeInfo, castZShapeInfo);
|
2019-06-06 14:21:15 +02:00
|
|
|
|
2019-11-13 15:15:18 +01:00
|
|
|
auto func = PRAGMA_THREADS_FOR {
|
2020-02-20 09:43:26 +01:00
|
|
|
for (auto i = start; i < stop; i++) {
|
2019-11-13 15:15:18 +01:00
|
|
|
auto tad = const_cast<X *>(x) + tadOffsets[i];
|
|
|
|
auto indexValue = OpType::startingIndexValue(tad);
|
|
|
|
|
2020-02-28 15:04:45 +01:00
|
|
|
for (Nd4jLong j = 0; j < tadLen; j++) {
|
2019-11-13 15:15:18 +01:00
|
|
|
auto tadOffset = shape::indexOffset(j, tadShapeInfo, castTadShapeInfo, canCastTad);
|
|
|
|
functions::indexreduce::IndexValue<X> comp(tad[tadOffset], j);
|
|
|
|
indexValue = OpType::update(indexValue, comp, extraParams);
|
|
|
|
}
|
2019-06-06 14:21:15 +02:00
|
|
|
|
2019-11-13 15:15:18 +01:00
|
|
|
auto zOffset = shape::indexOffset(i, zShapeInfo, castZShapeInfo, canCastZ);
|
|
|
|
z[zOffset] = (Z) indexValue.index;
|
2019-06-06 14:21:15 +02:00
|
|
|
}
|
2019-11-13 15:15:18 +01:00
|
|
|
};
|
2019-06-06 14:21:15 +02:00
|
|
|
|
2020-03-09 06:22:49 +01:00
|
|
|
samediff::Threads::parallel_tad(func, 0, zLen);
|
2019-06-06 14:21:15 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-08-27 09:37:10 +02:00
|
|
|
template <typename X, typename Y>
|
2020-05-09 07:06:14 +02:00
|
|
|
void sd::IndexReductionLoops<X, Y>::wrapIndexReduce(const int opNum, const void* vx, const Nd4jLong* xShapeInfo, void* vz, const Nd4jLong* zShapeInfo, const Nd4jLong* tadShapeInfo, const Nd4jLong* tadOffsets, void* vextraParams) {
|
|
|
|
auto x = reinterpret_cast<const X *>(vx);
|
2019-08-27 09:37:10 +02:00
|
|
|
auto z = reinterpret_cast<Y *>(vz);
|
2019-06-06 14:21:15 +02:00
|
|
|
auto extraParams = reinterpret_cast<X *>(vextraParams);
|
|
|
|
|
2019-08-27 09:37:10 +02:00
|
|
|
DISPATCH_BY_OPNUM_TT(loopIndexReduce, PARAMS(x, xShapeInfo, z, zShapeInfo, tadShapeInfo, tadOffsets, extraParams), INDEX_REDUCE_OPS);
|
2019-12-14 20:59:37 +01:00
|
|
|
}
|