MCPcopy Index your code
hub / github.com/arrayfire/arrayfire-rust / set_slices

Function set_slices

src/core/index.rs:450–461  ·  view source on GitHub ↗

Set `first` to `last` slices of `inout` Array to a new Array `new_slices` Slices indicate that the indexing is along 3rd dimension

(inout: &mut Array<T>, new_slices: &Array<T>, first: i64, last: i64)

Source from the content-addressed store, hash-verified

448///
449/// Slices indicate that the indexing is along 3rd dimension
450pub fn set_slices<T>(inout: &mut Array<T>, new_slices: &Array<T>, first: i64, last: i64)
451where
452 T: HasAfEnum,
453{
454 let step: f64 = if first > last && last < 0 { -1.0 } else { 1.0 };
455 let seqs = [
456 Seq::default(),
457 Seq::default(),
458 Seq::new(first as f64, last as f64, step),
459 ];
460 assign_seq(inout, &seqs, new_slices)
461}
462
463/// Lookup(hash) an Array using another Array
464///

Callers

nothing calls this directly

Calls 1

assign_seqFunction · 0.85

Tested by

no test coverage detected