Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion include/matx/core/make_tensor.h
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,7 @@ auto make_tensor( T *const data,
DefaultDescriptor<RANK> desc{shape, strides};
raw_pointer_buffer<T, matx_allocator<T>> rp{data, static_cast<size_t>(desc.TotalSize()*sizeof(T)), owning};
basic_storage<decltype(rp)> s{std::move(rp)};
return tensor_t<T,RANK, decltype(s), decltype(desc)>{data, shape, strides};
return tensor_t<T,RANK, decltype(s), decltype(desc)>{s, std::move(desc), data};
}

/**
Expand Down
2 changes: 1 addition & 1 deletion include/matx/core/tensor_desc.h
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ class tensor_desc_t {
__MATX_INLINE__ __MATX_HOST__ tensor_desc_t(S2 &&shape, const stride_type (&strides)[RANK]) :
shape_(std::forward<S2>(shape)) {
for (int i = 0; i < RANK; i++) {
MATX_ASSERT_STR(*(shape + i) > 0, matxInvalidSize,
MATX_ASSERT_STR(*(shape.begin() + i) > 0, matxInvalidSize,
"Must specify size larger than 0 for each dimension");
*(stride_.begin() + i) = strides[i];
}
Expand Down