We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
shape
strides
ninetoothed::Tensor
1 parent a524007 commit 9ea44dbCopy full SHA for 9ea44db
src/infiniop/ninetoothed/utils.h
@@ -19,6 +19,8 @@ class Tensor {
19
20
Tensor(const void *data, std::initializer_list<Size> shape, std::initializer_list<Stride> strides) : Tensor{data, decltype(shape_){shape}, decltype(strides_){strides}} {}
21
22
+ Tensor(const void *data, const Size *shape, const Stride *strides, Size ndim) : data_{data}, shape_{shape, shape + ndim}, strides_{strides, strides + ndim}, ndim_{shape_.size()} {}
23
+
24
Tensor(const T value) : value_{value}, data_{&value_}, ndim_{0} {}
25
26
operator NineToothedTensor() { return {const_cast<Data>(data_), shape_.data(), strides_.data()}; }
0 commit comments