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

Function macro_seq_array_assign

src/core/macros.rs:474–486  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

472
473 #[test]
474 fn macro_seq_array_assign() {
475 set_device(0);
476 // ANCHOR: macro_seq_array_assign
477 let values: [f32; 3] = [1.0, 2.0, 3.0];
478 let indices = Array::new(&values, dim4!(3));
479 let seq4gen = seq!(0:2:1);
480 let mut a = randu::<f32>(dim4!(5, 3));
481
482 let b = constant(2.0 as f32, dim4!(3, 3));
483
484 eval!(a[indices, seq4gen] = b);
485 // ANCHOR_END: macro_seq_array_assign
486 }
487
488 #[test]
489 fn constant_macro() {

Callers

nothing calls this directly

Calls 2

set_deviceFunction · 0.85
constantFunction · 0.85

Tested by

no test coverage detected