chore: import upstream snapshot with attribution

This commit is contained in:
wehub-resource-sync
2026-07-13 12:47:05 +08:00
commit 4f3b7da785
7394 changed files with 2005594 additions and 0 deletions
@@ -0,0 +1,86 @@
/* ******************************************************************************
*
*
* 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.
*
* See the NOTICE file distributed with this work for additional
* information regarding copyright ownership.
* 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
******************************************************************************/
//
// BroadcastBool template instantiations
//
#include <loops/pairwise_instantiations.h>
#include <types/type_promote.h>
#include <loops/broadcasting_bool.h>
#include <loops/cpu/broadcasting_bool.hpp>
/*
*
* Function Instantiation:
* BroadcastBool::exec instantiated for types in @COMB1@, @COMB2@
*/
ITERATE_COMBINATIONS(
SD_COMMON_TYPES_PART_@COMB1@,
SD_COMMON_TYPES_PART_@COMB2@,
INSTANT_PROCESS_COMBINATION,
functions::broadcast::BroadcastBool,
::exec(int opNum, const void *x, const sd::LongType *xShapeInfo, const void *y,
const sd::LongType *yShapeInfo, void *z, const sd::LongType *zShapeInfo,
void *extraParams, sd::LongType *dimension, sd::LongType dimensionLength,
const sd::LongType *tadOnlyShapeInfo, const sd::LongType *tadOffsets,
const sd::LongType *tadOnlyShapeInfoZ, const sd::LongType *tadOffsetsZ,
sd::LongType start, sd::LongType stop)
)
/*
*
* Function Instantiation:
* BroadcastBool::exec (simple version) instantiated for types in @COMB1@, @COMB2@
*/
ITERATE_COMBINATIONS(
SD_COMMON_TYPES_PART_@COMB1@,
SD_COMMON_TYPES_PART_@COMB2@,
INSTANT_PROCESS_COMBINATION,
functions::broadcast::BroadcastBool,
::exec(int opNum, const void *x, const sd::LongType *xShapeInfo, const void *y,
const sd::LongType *yShapeInfo, void *z, const sd::LongType *zShapeInfo,
void *extraParams)
)
/*
*
* Function Instantiation:
* BroadcastBool::execInverse instantiated for types in @COMB1@, @COMB2@
*/
ITERATE_COMBINATIONS(
SD_COMMON_TYPES_PART_@COMB1@,
SD_COMMON_TYPES_PART_@COMB2@,
INSTANT_PROCESS_COMBINATION,
functions::broadcast::BroadcastBool,
::execInverse(int opNum, const void *x, const sd::LongType *xShapeInfo, const void *y,
const sd::LongType *yShapeInfo, void *z, const sd::LongType *zShapeInfo,
void *extraParams, sd::LongType *dimension, sd::LongType dimensionLength,
const sd::LongType *tadOnlyShapeInfo, const sd::LongType *tadOffsets,
const sd::LongType *tadOnlyShapeInfoZ, const sd::LongType *tadOffsetsZ,
sd::LongType start, sd::LongType stop)
)
/*
*
* Explicit instantiation for bool types (since BroadcastBool typically uses bool output)
*/
template class functions::broadcast::BroadcastBool<bool, bool>;
@@ -0,0 +1,31 @@
/* ******************************************************************************
*
*
* 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.
*
* See the NOTICE file distributed with this work for additional
* information regarding copyright ownership.
* 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
******************************************************************************/
//
// BroadcastBool template instantiations - Direct instantiation version
// This file is designed for 2-type combinations
//
#include <loops/cpu/broadcasting_bool.hpp>
#include <types/types.h>
// Direct instantiations will be inserted here by the CMake template system
// The handler will generate instantiations like:
// template void functions::broadcast::BroadcastBool<float, bool>::exec(...);
// template void functions::broadcast::BroadcastBool<double, bool>::exec(...);
// etc.
@@ -0,0 +1,95 @@
/* ******************************************************************************
*
*
* 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.
*
* See the NOTICE file distributed with this work for additional
* information regarding copyright ownership.
* 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
******************************************************************************/
//
// Broadcast template instantiations
//
#include <loops/pairwise_instantiations.h>
#include <types/type_promote.h>
#include <loops/cpu/broadcasting.hpp>
/*
*
* Function Instantiation:
* Broadcast::exec instantiated for types in @COMB1@, @COMB2@, @COMB3@
*/
ITERATE_COMBINATIONS_3(
SD_COMMON_TYPES_PART_@COMB1@,
SD_COMMON_TYPES_PART_@COMB2@,
SD_COMMON_TYPES_PART_@COMB3@,
INSTANT_PROCESS_COMBINATION_3,
functions::broadcast::Broadcast,
::exec(int opNum, const void *x, const sd::LongType *xShapeInfo, const void *y,
const sd::LongType *yShapeInfo, void *z, const sd::LongType *zShapeInfo,
sd::LongType *dimension, sd::LongType dimensionLength,
const sd::LongType *tadOnlyShapeInfo, const sd::LongType *tadOffsets,
const sd::LongType *tadOnlyShapeInfoZ, const sd::LongType *tadOffsetsZ,
sd::LoopKind::Kind loopKind, sd::LongType start, sd::LongType stop)
)
/*
*
* Function Instantiation:
* Broadcast::exec (simple version) instantiated for types in @COMB1@, @COMB2@, @COMB3@
*/
ITERATE_COMBINATIONS_3(
SD_COMMON_TYPES_PART_@COMB1@,
SD_COMMON_TYPES_PART_@COMB2@,
SD_COMMON_TYPES_PART_@COMB3@,
INSTANT_PROCESS_COMBINATION_3,
functions::broadcast::Broadcast,
::exec(int opNum, const void *x, const sd::LongType *xShapeInfo, const void *y,
const sd::LongType *yShapeInfo, void *z, const sd::LongType *zShapeInfo)
)
/*
*
* Function Instantiation:
* Broadcast::execInverse instantiated for types in @COMB1@, @COMB2@, @COMB3@
*/
ITERATE_COMBINATIONS_3(
SD_COMMON_TYPES_PART_@COMB1@,
SD_COMMON_TYPES_PART_@COMB2@,
SD_COMMON_TYPES_PART_@COMB3@,
INSTANT_PROCESS_COMBINATION_3,
functions::broadcast::Broadcast,
::execInverse(int opNum, const void *x, const sd::LongType *xShapeInfo, const void *y,
const sd::LongType *yShapeInfo, void *z, const sd::LongType *zShapeInfo,
sd::LongType *dimension, sd::LongType dimensionLength,
const sd::LongType *tadOnlyShapeInfo, const sd::LongType *tadOffsets,
const sd::LongType *tadOnlyShapeInfoZ, const sd::LongType *tadOffsetsZ,
sd::LongType start, sd::LongType stop)
)
/*
*
* Function Instantiation:
* BroadcastBool::exec instantiated for bool types
*/
template void functions::broadcast::BroadcastBool<bool, bool>::exec(
int opNum, const void *x, const sd::LongType *xShapeInfo, const void *y,
const sd::LongType *yShapeInfo, void *z, const sd::LongType *zShapeInfo,
void *extraParams, sd::LongType *dimension, sd::LongType dimensionLength,
const sd::LongType *tadOnlyShapeInfo, const sd::LongType *tadOffsets,
const sd::LongType *tadOnlyShapeInfoZ, const sd::LongType *tadOffsetsZ,
sd::LongType start, sd::LongType stop);
@@ -0,0 +1,57 @@
/* ******************************************************************************
*
*
* 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.
*
* See the NOTICE file distributed with this work for additional
* information regarding copyright ownership.
* 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
******************************************************************************/
//
// BroadcastInt template instantiations
//
#include <loops/cpu/broadcasting_int.hpp>
#include <loops/pairwise_instantiations.h>
#include <system/type_boilerplate.h>
/*
* Macro for instantiating BroadcastInt for a single type
* This follows the pattern where BroadcastInt is specialized for integer types only
*/
#define INSTANTIATE_BROADCAST_INT(TYPE_TUPLE) \
template void functions::broadcast::BroadcastInt<GET_SECOND(TYPE_TUPLE)>::exec( \
int opNum, const void *x, const sd::LongType *xShapeInfo, const void *y, \
const sd::LongType *yShapeInfo, void *z, const sd::LongType *zShapeInfo, \
sd::LongType *dimension, sd::LongType dimensionLength, \
const sd::LongType *tadOnlyShapeInfo, const sd::LongType *tadOffsets, \
const sd::LongType *tadOnlyShapeInfoZ, const sd::LongType *tadOffsetsZ, \
sd::LongType start, sd::LongType stop); \
\
template void functions::broadcast::BroadcastInt<GET_SECOND(TYPE_TUPLE)>::exec( \
int opNum, const void *x, const sd::LongType *xShapeInfo, const void *y, \
const sd::LongType *yShapeInfo, void *z, const sd::LongType *zShapeInfo); \
\
template void functions::broadcast::BroadcastInt<GET_SECOND(TYPE_TUPLE)>::execInverse( \
int opNum, const void *x, const sd::LongType *xShapeInfo, const void *y, \
const sd::LongType *yShapeInfo, void *z, const sd::LongType *zShapeInfo, \
sd::LongType *dimension, sd::LongType dimensionLength, \
const sd::LongType *tadOnlyShapeInfo, const sd::LongType *tadOffsets, \
const sd::LongType *tadOnlyShapeInfoZ, const sd::LongType *tadOffsetsZ, \
sd::LongType start, sd::LongType stop);
/*
* Function Instantiation:
* BroadcastInt instantiated for all integer types in SD_INTEGER_TYPES_PART_@COMB1@
*/
ITERATE_LIST((SD_INTEGER_TYPES_PART_@COMB1@), INSTANTIATE_BROADCAST_INT)
@@ -0,0 +1,35 @@
/*
* ******************************************************************************
* *
* *
* * 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.
* *
* * See the NOTICE file distributed with this work for additional
* * information regarding copyright ownership.
* * 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
* *****************************************************************************
*/
//
// Created by agibsonccc on 12/26/24.
//
#include <helpers/cpu/loops/IndexReductionLoops.hpp>
#include <system/type_boilerplate.h>
// Note: Instantiations are generated to prevent compiler memory issues
ITERATE_COMBINATIONS(
SD_COMMON_TYPES_PART_@COMB1@,
SD_COMMON_TYPES_PART_@COMB2@,
template class sd::IndexReductionLoops,
IndexReductionLoops,
;
)
@@ -0,0 +1,40 @@
// pairwise_instantiation_template_3.cpp.in
/*
* ******************************************************************************
* *
* *
* * 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.
* *
* * See the NOTICE file distributed with this work for additional
* * information regarding copyright ownership.
* * 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
* *****************************************************************************
*/
//
// Created by agibsonccc on 11/22/24.
//
#include <loops/pairwise_instantiations.h>
#include <types/type_promote.h>
#include <loops/cpu/pairwise.hpp>
// Note: Instantiations are generated to prevent compiler memory issues
ITERATE_COMBINATIONS(
SD_COMMON_TYPES_PART_@COMB1@,
SD_COMMON_TYPES_PART_@COMB2@,
CALLBACK_INSTANTIATE_PROMOTE,
promote,
;
)
@@ -0,0 +1,44 @@
/*
* ******************************************************************************
* *
* *
* * 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.
* *
* * See the NOTICE file distributed with this work for additional
* * information regarding copyright ownership.
* * 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
* *****************************************************************************
*/
//
// Created by agibsonccc on 11/22/24.
//
#include <loops/pairwise_instantiations.h>
#include <types/type_promote.h>
#include <loops/cpu/pairwise.hpp>
/*
*
* Function Instantiation:
* PairWiseTransform::exec instantiated for types in @COMB1@, @COMB2@, @COMB3@
*/
ITERATE_COMBINATIONS_3(
SD_COMMON_TYPES_PART_@COMB1@,
SD_COMMON_TYPES_PART_@COMB2@,
SD_COMMON_TYPES_PART_@COMB3@,
INSTANT_PROCESS_COMBINATION_3,
functions::pairwise_transforms::PairWiseTransform,
::exec(int opNum, const void *x, const sd::LongType *xShapeInfo, const void *y,
const sd::LongType *yShapeInfo, void *z, const sd::LongType *zShapeInfo,
void *extraParams, sd::LongType start, sd::LongType stop)
)
@@ -0,0 +1,66 @@
/* ******************************************************************************
*
*
* 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.
*
* See the NOTICE file distributed with this work for additional
* information regarding copyright ownership.
* 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
******************************************************************************/
//
// Created by agibsonccc on 1/3/25.
//
#include <loops/cpu/random.hpp>
#include <loops/pairwise_instantiations.h>
#include <system/type_boilerplate.h>
/*
* Function Instantiation:
* RandomFunction instantiated for float types in @COMB1@
*/
#define LIST_CALLBACK_EXEC_TRANSFORM_1(INPUT) \
template void functions::random::RandomFunction<GET_SECOND(INPUT)>::execTransform( \
int opNum, \
sd::Pointer state, \
const void *x, \
const sd::LongType *xShapeInfo, \
void *z, \
const sd::LongType *zShapeInfo, \
void *extraArguments);
ITERATE_LIST((SD_COMMON_TYPES_PART_@COMB1@), LIST_CALLBACK_EXEC_TRANSFORM_1)
#define LIST_CALLBACK_EXEC_TRANSFORM_2(INPUT) \
template void functions::random::RandomFunction<GET_SECOND(INPUT)>::execTransform( \
int opNum, \
sd::Pointer state, \
const void *x, \
const sd::LongType *xShapeInfo, \
const void *y, \
const sd::LongType *yShapeInfo, \
void *z, \
const sd::LongType *zShapeInfo, \
void *extraArguments);
ITERATE_LIST((SD_COMMON_TYPES_PART_@COMB1@), LIST_CALLBACK_EXEC_TRANSFORM_2)
#define LIST_CALLBACK_EXEC_TRANSFORM_3(INPUT) \
template void functions::random::RandomFunction<GET_SECOND(INPUT)>::execTransform( \
int opNum, \
sd::Pointer state, \
void *z, \
const sd::LongType *zShapeInfo, \
void *extraArguments);
ITERATE_LIST((SD_COMMON_TYPES_PART_@COMB1@), LIST_CALLBACK_EXEC_TRANSFORM_3)
@@ -0,0 +1,62 @@
/* ******************************************************************************
*
*
* 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.
*
* See the NOTICE file distributed with this work for additional
* information regarding copyright ownership.
* 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
******************************************************************************/
//
// Created by agibsonccc on 1/3/25.
//
#include <loops/cpu/reduce3.hpp>
#include <loops/pairwise_instantiations.h>
#include <system/type_boilerplate.h>
/*
* Function Instantiation:
* Reduce3 instantiated for types @COMB1@, @COMB2@
*/
ITERATE_COMBINATIONS(
SD_COMMON_TYPES_PART_@COMB1@,
SD_FLOAT_TYPES_PART_@COMB2@,
INSTANT_PROCESS_COMBINATION_2,
functions::reduce3::Reduce3,
::execScalar(const int opNum, const void *vx, const sd::LongType *xShapeInfo, void *extraParamsVals, const void *vy, const sd::LongType *yShapeInfo, void *vz, const sd::LongType *zShapeInfo)
)
ITERATE_COMBINATIONS(
SD_COMMON_TYPES_PART_@COMB1@,
SD_FLOAT_TYPES_PART_@COMB2@,
INSTANT_PROCESS_COMBINATION_2,
functions::reduce3::Reduce3,
::exec(int opNum, const void *vx, const sd::LongType *xShapeInfo, void *extraParamsVals, const void *vy, const sd::LongType *yShapeInfo, void *vz, const sd::LongType *zShapeInfo, sd::LongType *dimension, sd::LongType dimensionLength, sd::LongType start, sd::LongType stop)
)
ITERATE_COMBINATIONS(
SD_COMMON_TYPES_PART_@COMB1@,
SD_FLOAT_TYPES_PART_@COMB2@,
INSTANT_PROCESS_COMBINATION_2,
functions::reduce3::Reduce3,
::exec(int opNum, const void *vx, const sd::LongType *xShapeInfo, void *extraParamsVals, const void *vy, const sd::LongType *yShapeInfo, void *vz, const sd::LongType *zShapeInfo, sd::LongType *dimension, sd::LongType dimensionLength, const sd::LongType *tadShapeInfo, const sd::LongType *tadOffsets, sd::LongType start, sd::LongType stop)
)
ITERATE_COMBINATIONS(
SD_COMMON_TYPES_PART_@COMB1@,
SD_FLOAT_TYPES_PART_@COMB2@,
INSTANT_PROCESS_COMBINATION_2,
functions::reduce3::Reduce3,
::execAll(int opNum, const void *vx, const sd::LongType *xShapeInfo, void *extraParamsVals, const void *vy, const sd::LongType *yShapeInfo, void *vz, const sd::LongType *zShapeInfo, sd::LongType *dimension, sd::LongType dimensionLength, const sd::LongType *xTadShapeInfo, const sd::LongType *xOffsets, const sd::LongType *yTadShapeInfo, const sd::LongType *yOffsets, sd::LongType start, sd::LongType stop)
)
@@ -0,0 +1,54 @@
/* ******************************************************************************
*
*
* 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.
*
* See the NOTICE file distributed with this work for additional
* information regarding copyright ownership.
* 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
******************************************************************************/
//
// Created by agibsonccc on 1/3/25.
//
#include <loops/cpu/reduce/reduce_bool.hpp>
#include <loops/pairwise_instantiations.h>
#include <system/type_boilerplate.h>
/*
* Function Instantiation:
* ReduceBoolFunction instantiated for types @COMB1@, @COMB2@
*/
ITERATE_COMBINATIONS(
SD_COMMON_TYPES_PART_@COMB1@,
SD_BOOL_TYPES_PART_@COMB2@,
INSTANT_PROCESS_COMBINATION_2,
functions::reduce::ReduceBoolFunction,
::execScalar(const int opNum, const void *x, const sd::LongType *xShapeInfo, void *extraParams)
)
ITERATE_COMBINATIONS(
SD_COMMON_TYPES_PART_@COMB1@,
SD_BOOL_TYPES_PART_@COMB2@,
INSTANT_PROCESS_COMBINATION_2,
functions::reduce::ReduceBoolFunction,
::execScalar(const int opNum, const void *x, const sd::LongType *xShapeInfo, void *extraParams, void *z, const sd::LongType *zShapeInfo)
)
ITERATE_COMBINATIONS(
SD_COMMON_TYPES_PART_@COMB1@,
SD_BOOL_TYPES_PART_@COMB2@,
INSTANT_PROCESS_COMBINATION_2,
functions::reduce::ReduceBoolFunction,
::exec(int opNum, sd::memory::Workspace *workspace, const void *vx, const sd::LongType *xShapeInfo, void *vextraParams, void *vz, const sd::LongType *zShapeInfo, const sd::LongType *dims)
)
@@ -0,0 +1,54 @@
/* ******************************************************************************
*
*
* 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.
*
* See the NOTICE file distributed with this work for additional
* information regarding copyright ownership.
* 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
******************************************************************************/
//
// Created by agibsonccc on 1/3/25.
//
#include <loops/cpu/reduce/reduce_float.hpp>
#include <loops/pairwise_instantiations.h>
#include <system/type_boilerplate.h>
/*
* Function Instantiation:
* ReduceFloatFunction instantiated for types @COMB1@, @COMB2@
*/
ITERATE_COMBINATIONS(
SD_NUMERIC_TYPES_PART_@COMB1@,
SD_FLOAT_TYPES_PART_@COMB2@,
INSTANT_PROCESS_COMBINATION_2,
functions::reduce::ReduceFloatFunction,
::execScalar(const int opNum, const void *x, const sd::LongType *xShapeInfo, void *extraParams)
)
ITERATE_COMBINATIONS(
SD_NUMERIC_TYPES_PART_@COMB1@,
SD_FLOAT_TYPES_PART_@COMB2@,
INSTANT_PROCESS_COMBINATION_2,
functions::reduce::ReduceFloatFunction,
::execScalar(const int opNum, const void *x, const sd::LongType *xShapeInfo, void *extraParams, void *z, const sd::LongType *zShapeInfo)
)
ITERATE_COMBINATIONS(
SD_NUMERIC_TYPES_PART_@COMB1@,
SD_FLOAT_TYPES_PART_@COMB2@,
INSTANT_PROCESS_COMBINATION_2,
functions::reduce::ReduceFloatFunction,
::exec(int opNum, sd::memory::Workspace *workspace, const void *vx, const sd::LongType *xShapeInfo, void *vextraParams, void *vz, const sd::LongType *zShapeInfo, const sd::LongType *dims)
)
@@ -0,0 +1,54 @@
/* ******************************************************************************
*
*
* 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.
*
* See the NOTICE file distributed with this work for additional
* information regarding copyright ownership.
* 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
******************************************************************************/
//
// Created by agibsonccc on 1/3/25.
//
#include <loops/cpu/reduce/reduce_long.hpp>
#include <loops/pairwise_instantiations.h>
#include <system/type_boilerplate.h>
/*
* Function Instantiation:
* ReduceLongFunction instantiated for types @COMB1@, @COMB2@
*/
ITERATE_COMBINATIONS(
SD_COMMON_TYPES_PART_@COMB1@,
SD_LONG_TYPES_PART_@COMB2@,
INSTANT_PROCESS_COMBINATION_2,
functions::reduce::ReduceLongFunction,
::execScalar(const int opNum, const void *x, const sd::LongType *xShapeInfo, void *extraParams)
)
ITERATE_COMBINATIONS(
SD_COMMON_TYPES_PART_@COMB1@,
SD_LONG_TYPES_PART_@COMB2@,
INSTANT_PROCESS_COMBINATION_2,
functions::reduce::ReduceLongFunction,
::execScalar(const int opNum, const void *x, const sd::LongType *xShapeInfo, void *extraParams, void *z, const sd::LongType *zShapeInfo)
)
ITERATE_COMBINATIONS(
SD_COMMON_TYPES_PART_@COMB1@,
SD_LONG_TYPES_PART_@COMB2@,
INSTANT_PROCESS_COMBINATION_2,
functions::reduce::ReduceLongFunction,
::exec(const int opNum, sd::memory::Workspace *workspace, const void *vx, const sd::LongType *xShapeInfo, void *vextraParams, void *vz, const sd::LongType *zShapeInfo, sd::LongType *dims)
)
@@ -0,0 +1,63 @@
/* ******************************************************************************
*
*
* 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.
*
* See the NOTICE file distributed with this work for additional
* information regarding copyright ownership.
* 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
******************************************************************************/
//
// Created by agibsonccc on 1/3/25.
//
#include <loops/cpu/reduce/reduce_same.hpp>
#include <loops/pairwise_instantiations.h>
#include <system/type_boilerplate.h>
/*
* Function Instantiation:
* ReduceSameFunction instantiated for common types in @COMB1@
*/
#define LIST_CALLBACK_EXEC_SCALAR_1(INPUT) \
template void* functions::reduce::ReduceSameFunction<GET_SECOND(INPUT)>::execScalar( \
const int opNum, \
const void *x, \
const sd::LongType *xShapeInfo, \
void *extraParams);
ITERATE_LIST((SD_COMMON_TYPES_PART_@COMB1@), LIST_CALLBACK_EXEC_SCALAR_1)
#define LIST_CALLBACK_EXEC_SCALAR_2(INPUT) \
template void functions::reduce::ReduceSameFunction<GET_SECOND(INPUT)>::execScalar( \
const int opNum, \
const void *x, \
const sd::LongType *xShapeInfo, \
void *extraParams, \
void *z, \
const sd::LongType *zShapeInfo);
ITERATE_LIST((SD_COMMON_TYPES_PART_@COMB1@), LIST_CALLBACK_EXEC_SCALAR_2)
#define LIST_CALLBACK_EXEC(INPUT) \
template void functions::reduce::ReduceSameFunction<GET_SECOND(INPUT)>::exec( \
int opNum, \
sd::memory::Workspace *workspace, \
const void *vx, \
const sd::LongType *xShapeInfo, \
void *vextraParams, \
void *vz, \
const sd::LongType *zShapeInfo, \
const sd::LongType *dims);
ITERATE_LIST((SD_COMMON_TYPES_PART_@COMB1@), LIST_CALLBACK_EXEC)
@@ -0,0 +1,42 @@
/* ******************************************************************************
*
*
* 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.
*
* See the NOTICE file distributed with this work for additional
* information regarding copyright ownership.
* 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
******************************************************************************/
//
// Created by agibsonccc on 12/30/24.
//
#include <loops/pairwise_instantiations.h>
#include <types/type_promote.h>
#include <loops/cpu/scalar.hpp>
/*
*
* Function Instantiation:
* ScalarTransform::transform instantiated for types in @COMB1@, @COMB2@, @COMB3@
*/
ITERATE_COMBINATIONS_3(
SD_COMMON_TYPES_PART_@COMB1@,
SD_COMMON_TYPES_PART_@COMB2@,
SD_COMMON_TYPES_PART_@COMB3@,
INSTANT_PROCESS_COMBINATION_3,
functions::scalar::ScalarTransform,
::transform(int opNum, const void *x, const sd::LongType *xShapeInfo, void *result,
const sd::LongType *resultShapeInfo, const void *scalar, void *extraParams, sd::LongType start,
sd::LongType stop)
)