3#include "ml_core/callbacks.h"
13typedef std::shared_ptr<blace::ops::BaseOp> OpP;
35 EXPORT_OR_IMPORT
Slice(std::optional<int64_t> start_index = std::nullopt,
36 std::optional<int64_t> stop_index = std::nullopt,
37 std::optional<int64_t> step_index = std::nullopt);
44 inline int64_t
start()
const {
return start_; }
51 inline int64_t
stop()
const {
return stop_; }
58 inline int64_t
step()
const {
return step_; }
66enum class BlaceIndexType { None, Slice, OpP, Int };
92 : slice_(std::move(
slice)), type_(BlaceIndexType::
Slice) {}
101 : node_op_to_eval_(std::move(tensor)), type_(BlaceIndexType::OpP) {}
182 int64_t integer_ = 0;
184 blace::ops::OpP node_op_to_eval_;
185 BlaceIndexType type_;
188typedef std::vector<BlaceIndex> BlaceIndexVec;
Definition: blace_index.h:72
BlaceIndex()
Definition: blace_index.h:77
BlaceIndex(int64_t integer)
Definition: blace_index.h:84
BlaceIndex(blace::ml_core::Slice slice)
Definition: blace_index.h:91
blace::ml_core::Slice getSlice()
const blace::ml_core::Slice & slice() const
bool operator==(const BlaceIndex &rhs) const
blace::ops::OpP getNodeOp()
const blace::ops::OpP & node_op() const
BlaceIndex(blace::ops::OpP tensor)
Definition: blace_index.h:100
Definition: blace_index.h:24
int64_t start() const
Definition: blace_index.h:44
int64_t step() const
Definition: blace_index.h:58
int64_t stop() const
Definition: blace_index.h:51
EXPORT_OR_IMPORT Slice(std::optional< int64_t > start_index=std::nullopt, std::optional< int64_t > stop_index=std::nullopt, std::optional< int64_t > step_index=std::nullopt)