Skip to content

Conversation

@umar456
Copy link
Member

@umar456 umar456 commented Jun 21, 2022

This commit limits the types that can be used in the initializer
list to fundamental types. This change is necessary because when
we use the uniform initialization syntax and pass in an array, the
compiler incorrectly uses the initialization list constructor instead
of the other array constructor.

Description

Previously the following code was not able to compile:

array a = randu(10, 10);
array b{a};

This was incorrectly using the initializer list syntax instead of the af::array(af::array other) constructor.

Changes to Users

Users can now use the universal syntax to initialize ArrayFire arrays

Checklist

  • Rebased on latest master
  • Code compiles
  • Tests pass
  • [ ] Functions added to unified API
  • [ ] Functions documented

This commit limits the types that can be used in the initializer
list to fundamental types. This change is necessary because when
we use the uniform initialization syntax and pass in an array, the
compiler incorrectly uses the initialization list constructor instead
of the other array constructor.
@umar456 umar456 force-pushed the initializer_list_fix branch from 17ef5aa to 5109060 Compare June 21, 2022 20:43
@umar456 umar456 merged commit 2688275 into arrayfire:master Jun 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants