Add vector & matrix modules

This commit is contained in:
Kiana Sheibani 2022-05-21 16:38:21 -04:00
parent 1e7660b1f2
commit 861f1e29f2
Signed by: toki
GPG key ID: 6CB106C25E86A9F7
9 changed files with 236 additions and 34 deletions

View file

@ -30,6 +30,11 @@ arrayDataSet : Nat -> a -> ArrayData a -> IO ()
arrayDataSet n x arr = fromPrim $ prim__arraySet arr (cast n) x
||| Construct an array with a constant value.
export
constant : Nat -> a -> PrimArray a
constant size x = MkPrimArray size $ unsafePerformIO $ newArrayData size x
||| Construct an array from a list of "instructions" to write a
||| value to a particular index.
export