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

Function get_row

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

Source from the content-addressed store, hash-verified

825
826 #[test]
827 fn get_row() {
828 set_device(0);
829 // ANCHOR: get_row
830 let a = randu::<f32>(dim4!(5, 5));
831 // [5 5 1 1]
832 // 0.6010 0.5497 0.1583 0.3636 0.6755
833 // 0.0278 0.2864 0.3712 0.4165 0.6105
834 // 0.9806 0.3410 0.3543 0.5814 0.5232
835 // 0.2126 0.7509 0.6450 0.8962 0.5567
836 // 0.0655 0.4105 0.9675 0.3712 0.7896
837 let _r = row(&a, -1);
838 // [1 5 1 1]
839 // 0.0655 0.4105 0.9675 0.3712 0.7896
840 let _c = col(&a, -1);
841 // [5 1 1 1]
842 // 0.6755
843 // 0.6105
844 // 0.5232
845 // 0.5567
846 // 0.7896
847 // ANCHOR_END: get_row
848 }
849
850 #[test]
851 fn get_rows() {

Callers

nothing calls this directly

Calls 3

set_deviceFunction · 0.85
rowFunction · 0.85
colFunction · 0.85

Tested by

no test coverage detected