Skip to content
Discussion options

You must be logged in to vote

Hi @ZJUGuoShuai, non_owning is still available and is the default when you pass in your own pointer, whereas if you don't pass in your own pointer, the type defaults to owning. We did make a change several months ago to make this a runtime parameter rather than a template parameter. For example:

auto make_tensor(T *data, const index_t (&shape)[RANK], bool owning = false) {

You would now do something like:

auto t = make_tensor(ptr, {1}, false);
auto t = make_tensor(ptr, {1}, true);

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by ZJUGuoShuai
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants