Skip to content

Conversation

9prady9
Copy link
Member

@9prady9 9prady9 commented May 28, 2020

This is required since by default a varialble reference immutable in
rust. However, arrayfire C API for assignment operations, af_assign_seq
and af_assign_gen, does use lhs as output. Thus, an Array passed as
lhs might get modifed some times, thus breaking the immutable ref rule.

This change fixes that by converting the lhs/inout paramters of
assignment functions to mutable references and removes return values
completely.

Fixes #222

This is required since by default a varialble reference immutable in
rust. However, arrayfire C API for assignment operations, af_assign_seq
and af_assign_gen, does use lhs as output. Thus, an Array passed as
lhs might get modifed some times, thus breaking the immutable ref rule.

This change fixes that by converting the lhs/inout paramters of
assignment functions to mutable references and removes return values
completely.
@9prady9 9prady9 added the Fix label May 28, 2020
@9prady9 9prady9 added this to the 3.7.1 milestone May 28, 2020
@9prady9 9prady9 merged commit 0d5facb into arrayfire:master May 28, 2020
@9prady9 9prady9 deleted the fix_issue_222 branch May 28, 2020 16:12
@9prady9 9prady9 modified the milestones: 3.8.0, 3.7.1 Sep 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

First Array is mutable for assignment functions
1 participant