Create a range of values Create an sequence [0, dims.elements() - 1] and modify to specified dimensions dims and then tile it according to tile_dims. # Parameters - `dims` is the dimensions of the sequence to be generated - `tdims` is the number of repitions of the unit dimensions # Return Values Array
(dims: Dim4, tdims: Dim4)
| 334 | /// |
| 335 | /// Array |
| 336 | pub fn iota<T: HasAfEnum>(dims: Dim4, tdims: Dim4) -> Array<T> { |
| 337 | let aftype = T::get_af_dtype(); |
| 338 | unsafe { |
| 339 | let mut temp: af_array = std::ptr::null_mut(); |
| 340 | let err_val = af_iota( |
| 341 | &mut temp as *mut af_array, |
| 342 | dims.ndims() as c_uint, |
| 343 | dims.get().as_ptr() as *const dim_t, |
| 344 | tdims.ndims() as c_uint, |
| 345 | tdims.get().as_ptr() as *const dim_t, |
| 346 | aftype as c_uint, |
| 347 | ); |
| 348 | HANDLE_ERROR(AfError::from(err_val)); |
| 349 | temp.into() |
| 350 | } |
| 351 | } |
| 352 | |
| 353 | /// Create an identity array with 1's in diagonal |
| 354 | /// |
nothing calls this directly
no test coverage detected