尤安升delete licenses
6ba471ab创建于 2023年5月12日历史提交
/*!

 * \file experiment_ops.h

 * \brief

 */

#ifndef OPS_BUILT_IN_OP_PROTO_INC_INDEX_OPS_H_

#define OPS_BUILT_IN_OP_PROTO_INC_INDEX_OPS_H_

#include "graph/operator_reg.h"

namespace ge {

/**cd 

* @brief According to the indices, return the value.



* @par Inputs:

* Four inputs, including:

* @li x: A ND Tensor.

* @li indexed_sizes: A 1D Tensor of int64 with shape (N). Sizes for each one of the indexed data.

* @li indexed_strides: A 1D Tensor of int64 with shape (N). Strides for each one of the indexed data.

* @li indices: Dynamic input. A ND Tensor of int64. return the value according to the indices.



* @par Outputs:

* y: The indexed output tensor. Has the same type and format as input "x".

*/

REG_OP(Index)

    .INPUT(x, TensorType::BasicType())

    .INPUT(indexed_sizes, TensorType({DT_INT64}))

    .INPUT(indexed_strides, TensorType({DT_INT64}))

    .DYNAMIC_INPUT(indices, TensorType({DT_INT64}))

    .OUTPUT(y, TensorType::BasicType())

    .OP_END_FACTORY_REG(Index)

} // namespace ge

#endif  // OPS_BUILT_IN_OP_PROTO_INC_INDEX_OPS_H_