Last active
August 21, 2017 01:22
-
-
Save ryanrhymes/14de074b56cd36b5b876eeaac37eea92 to your computer and use it in GitHub Desktop.
test new slicing function
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let x = Arr.sequential [|2;3;4|];; | |
Owl_slicing_ext.(get_slice_list_typ [] x);; | |
Owl_slicing_ext.(get_slice_list_typ [ R[]; R[]; R[]] x);; | |
Owl_slicing_ext.(get_slice_list_typ [ I 1; R[]; R[]] x);; | |
Owl_slicing_ext.(get_slice_list_typ [ I 1; I 2; R[]] x);; | |
Owl_slicing_ext.(get_slice_list_typ [ I 1; I 0; I 3] x);; | |
Owl_slicing_ext.(get_slice_list_typ [ I 1; I 0; I 2] x);; | |
Owl_slicing_ext.(get_slice_list_typ [ L [0;1]; I 0; I 2] x);; | |
Owl_slicing_ext.(get_slice_list_typ [ R [-1;0]; I 0; R []] x);; | |
Owl_slicing_ext.(get_slice_list_typ [ R [-1;0]; I 0; R [1;2]] x);; | |
Owl_slicing_ext.(get_slice_list_typ [ R [-1;0]; I 0; R [2;1]] x);; | |
Owl_slicing_ext.(get_slice_list_typ [ R []; L [0;1;2]; R []] x);; | |
Owl_slicing_ext.(get_slice_list_typ [ R []; L [1;0;2]; R []] x);; | |
Owl_slicing_ext.(get_slice_list_typ [ R []; L [2;1;0]; R []] x);; | |
Owl_slicing_ext.(get_slice_list_typ [ R [1;0]; R []; R []] x);; | |
Owl_slicing_ext.(get_slice_list_typ [ R [0]; L [2;1;0;2]; R []] x);; | |
Owl_slicing_ext.(get_slice_list_typ [ R []; R []; R [1;1;1]] x);; | |
Owl_slicing_ext.(get_slice_list_typ [ R []; R []; L [1;1;1]] x);; | |
Owl_slicing_ext.(get_slice_list_typ [ L [0;0]; R []; R []] x);; | |
Owl_slicing_ext.(get_slice_list_typ [ L [0;0]; R []; R [-1;0]] x);; | |
Owl_slicing_ext.(get_slice_list_typ [ L [0;0]; R []; R [0;-1;2]] x);; | |
let x = Arr.sequential [|2;3;1|];; | |
Owl_slicing_ext.(get_slice_list_typ [] x);; | |
Owl_slicing_ext.(get_slice_list_typ [ R[]; R[]; R[]] x);; | |
Owl_slicing_ext.(get_slice_list_typ [ L [0;0]; R []; R [-1;0]] x);; | |
Owl_slicing_ext.(get_slice_list_typ [ L [0;0]; R []; R [0;-1]] x);; | |
let x = Arr.sequential [|2;1;3|];; | |
Owl_slicing_ext.(get_slice_list_typ [ R []; R []; R [-1;0]] x);; | |
Owl_slicing_ext.(get_slice_list_typ [ R []; R []; R [0;-1]] x);; | |
Owl_slicing_ext.(get_slice_list_typ [ L [0;0]; R []; R [-1;0]] x);; | |
Owl_slicing_ext.(get_slice_list_typ [ L [0;0]; R []; R [0;-1]] x);; | |
let x = Arr.sequential [|2;10;3|];; | |
Owl_slicing_ext.(get_slice_list_typ [ R []; R [-1;0;-2]; R []] x);; | |
Owl_slicing_ext.(get_slice_list_typ [ R []; R [-1;0;-2]; L [2;1;0]] x);; | |
let x = Arr.sequential [|200;300;400|];; | |
let f () = Owl_slicing_ext.(get_slice_list_typ [ R [0]; R []; R []] x);; | |
Utils.time f;; | |
let f () = Owl_slicing_ext.(get_slice_list_typ [ R [-1;0]; R []; R []] x);; | |
Utils.time f;; | |
let f () = Owl_slicing_ext.(get_slice_list_typ [ R []; R [0;-1]; R []] x);; | |
Utils.time f;; | |
let f () = Owl_slicing_ext.(get_slice_list_typ [ R []; R [-1;0]; R []] x);; | |
Utils.time f;; | |
let f () = Owl_slicing_ext.(get_slice_list_typ [ R []; R []; R [-1;0]] x);; | |
Utils.time f;; | |
let f () = Owl_slicing_ext.(get_slice_list_typ [ R []; R []; L [2;1;0]] x);; | |
Utils.time f;; | |
let x = Arr.uniform [|2;3;4|];; | |
let y = Arr.sequential [|1;2;1|];; | |
Owl_slicing_ext.(set_slice_list_typ [ I 0; L [0;1]; L [0]] x y);; | |
let x = Arr.uniform [|2;3;4|];; | |
let y = Arr.sequential [|1;2;3|];; | |
Owl_slicing_ext.(set_slice_list_typ [ I 0; L [1;0]; L [2;1;0]] x y);; | |
let x = Arr.uniform [|2;3;4|];; | |
let y = Arr.sequential [|1;2;3|];; | |
Owl_slicing_ext.(set_slice_list_typ [ I 1; L [2;0]; L [2;1;0]] x y);; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment