↰ Return to documentation for file (morpheus/_lib/src/objects/tensor_object.cpp
)
#include "morpheus/objects/tensor_object.hpp"
#include <vector>
namespace morpheus {
static void set_contiguous_stride(const std::vector<TensorIndex>& shape, std::vector<TensorIndex>& stride)
{
stride.resize(shape.size());
TensorIndex ttl = 1;
auto rank = shape.size();
for (int i = rank - 1; i >= 0; i--)
{
stride[i] = ttl;
ttl *= shape.at(i);
}
}
void TensorObject::throw_on_invalid_storage() {}
} // namespace morpheus