Skip to content

How to properly use join_many? #344

Answered by 9prady9
3togo asked this question in Q&A
Sep 6, 2022 · 1 comments · 6 replies
Discussion options

You must be logged in to vote

@3togo Perhaps join_many macro is what you are looking for ? It takes care of creating the vector out of Array references and passing it down to join function for you.

The reason most APIs of arrayfire-rust crate have Array& as arguments to enable reuse of the same memory for multiple operations. Otherwise, Array would be consumed by the first join_many and the original array can't be reused without a clone operation which is not free of cost always.

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@9prady9
Comment options

@3togo
Comment options

@9prady9
Comment options

@3togo
Comment options

@9prady9
Comment options

Answer selected by 3togo
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