Cast ArrayFire Array Data from f64 to f32 in C++

  arrayfire, c++

I have an ArrayFire array of dtype=f64 that I need to cast to dtype=f32. I’m not sure how to do this other than converting to a host array and iterating through doing a static_cast. I’m sure there is a better way. I found af_cast but it seems to only be a part of the C interface.

Source: Windows Questions C++