27std::vector<int>
_broadcastShape(std::vector<int> a, std::vector<int> b);
39 std::vector<int> originalStrides,
40 std::vector<int> targetShape);
48int _computeOffset(std::vector<int> index, std::vector<int> strides);
std::vector< int > _broadcastShape(std::vector< int > a, std::vector< int > b)
Computes the broadcasted shape of a and b together.
Definition utils.cpp:22
int _computeOffset(std::vector< int > index, std::vector< int > strides)
Computes offset based on the index and strides.
Definition utils.cpp:64
std::vector< int > _computeStrides(std::vector< int > newShape)
Computes strides from a new shape.
Definition utils.cpp:4
std::vector< int > _broadcastStrides(std::vector< int > originalShape, std::vector< int > originalStrides, std::vector< int > targetShape)
Computes the broadcasted strides based on original shape and strides, and target shape.
Definition utils.cpp:44