Skip to content

[Build] Half 2.2.0 is not compatible #370

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
BA8F0D39 opened this issue Dec 30, 2022 · 5 comments · Fixed by #371
Closed

[Build] Half 2.2.0 is not compatible #370

BA8F0D39 opened this issue Dec 30, 2022 · 5 comments · Fixed by #371
Assignees

Comments

@BA8F0D39
Copy link
Contributor

BA8F0D39 commented Dec 30, 2022

Description

The latest version of half 2.2.0 is not compatible with arrayfire-rust 3.8.0

Build Environment

Compiler version:
Operating system:
Build environment:

Error Log

use half;
use half::f16;
use half::*;
fn main() {

	let arr = vec![half::f16::from_f32(5.4), half::f16::from_f32(-2.1),half::f16::from_f32(-2.1)  ];

	let mut test = arrayfire::Array::new(&arr, arrayfire::Dim4::new(&[3, 1, 1, 1]));

}

error[E0277]: the trait bound f16: HasAfEnum is not satisfied
--> examples/test.rs:27:17
|
27 | let mut test = arrayfire::Array::new(&arr, arrayfire::Dim4::new(&[3, 1, 1, 1]));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait HasAfEnum is not implemented for f16
|
= help: the following other types implement trait HasAfEnum:
bool
f32
f64
half::binary16::f16
i16
i32
i64
num_complex::Complex
and 5 others
note: required by a bound in Array
--> /home/test/.cargo/registry/src/github.com-1ecc6299db9ec823/arrayfire-3.8.0/src/core/array.rs:163:21
|
163 | pub struct Array<T: HasAfEnum> {
| ^^^^^^^^^ required by this bound in Array

@BA8F0D39 BA8F0D39 changed the title [Build] Half 2.1.0 is not compatible [Build] Half 2.2.0 is not compatible Dec 31, 2022
@BA8F0D39
Copy link
Contributor Author

Updating half to 2.2.0 in the arrayfire-rust Cargo.toml fixes this

I need from_f32_const and from_f64_const from the newer half versions

@9prady9
Copy link
Member

9prady9 commented Jan 3, 2023

@BA8F0D39 Would it be possible for you to submit a PR ? That would be great.

@BA8F0D39
Copy link
Contributor Author

BA8F0D39 commented Feb 6, 2023

Done

@BA8F0D39
Copy link
Contributor Author

@9prady9

@9prady9
Copy link
Member

9prady9 commented Feb 23, 2023

@BA8F0D39 Thanks for the notification, sorry was on parental leave until recently. Will take a look at it this weekend.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants