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

Function setrow

src/core/index.rs:802–824  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

800
801 #[test]
802 fn setrow() {
803 set_device(0);
804 // ANCHOR: setrow
805 let a = randu::<f32>(dim4!(5, 5, 1, 1));
806 //print(&a);
807 // [5 5 1 1]
808 // 0.6010 0.5497 0.1583 0.3636 0.6755
809 // 0.0278 0.2864 0.3712 0.4165 0.6105
810 // 0.9806 0.3410 0.3543 0.5814 0.5232
811 // 0.2126 0.7509 0.6450 0.8962 0.5567
812 // 0.0655 0.4105 0.9675 0.3712 0.7896
813 let _r = row(&a, 4);
814 // [1 5 1 1]
815 // 0.0655 0.4105 0.9675 0.3712 0.7896
816 let _c = col(&a, 4);
817 // [5 1 1 1]
818 // 0.6755
819 // 0.6105
820 // 0.5232
821 // 0.5567
822 // 0.7896
823 // ANCHOR_END: setrow
824 }
825
826 #[test]
827 fn get_row() {

Callers

nothing calls this directly

Calls 3

set_deviceFunction · 0.85
rowFunction · 0.85
colFunction · 0.85

Tested by

no test coverage detected