Skip to content

Implement arithmetic ops for &Array vs &Array #103

Closed
@AtheMathmo

Description

@AtheMathmo

Is there any reason why arithmetic overloading only exists for Array-Array? Given that the arrayfire::add/sub/mul functions all take &Array arguments it seems like it is worth having the extra syntactic sugar.

Just to be clear, I mean implementations like this:

impl<'a> Add<&'a Array> for Array { }
impl<'a> Add<Array> for &'a Array { }
impl<'a, 'b> Add<&'a Array> for &'b Array { }

Internally these would just call arrayfire::add.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions