Skip to content

Passing tensor buffer to methods taking const Eigen::ArrayXd& without copying #89

Answered by ianhbell
ianhbell asked this question in Q&A
Discussion options

You must be logged in to vote

My previous point stands, Eigen::Ref<...> -> const Eigen::ArrayXd& always invokes a copy. So, how should one make a function that calls to a function in an API that takes const Eigen::ArrayXd& as an argument?

Replies: 8 comments 11 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@wjakob
Comment options

Comment options

You must be logged in to vote
1 reply
@wjakob
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
4 replies
@wjakob
Comment options

@wjakob
Comment options

@ianhbell
Comment options

@ianhbell
Comment options

Comment options

You must be logged in to vote
5 replies
@wjakob
Comment options

@ianhbell
Comment options

@ianhbell
Comment options

@wjakob
Comment options

@ianhbell
Comment options

Answer selected by wjakob
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #88 on October 15, 2022 07:52.