Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions lagoon/nockapp/lib/lagoon-sur.hoon
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
:: /sur/lagoon
:::: Types for Lagoon compatibility
::
|%
+$ ray :: $ray: n-dimensional array
$: =meta :: descriptor
data=@ux :: data, row-major order, 1-pin MSB
==
::
+$ prec [a=@ b=@] :: fixed-point precision, a+b+1=bloq
+$ meta :: $meta: metadata for a $ray
$: shape=(list @) :: list of dimension lengths
=bloq :: logarithm of bitwidth
=kind :: name of data type
tail=* :: placeholder for future data (jet convenience)
==
::
+$ kind :: $kind: type of array scalars
$? %i754 :: IEEE 754 float
%uint :: unsigned integer
%int2 :: 2s-complement integer (/lib/twoc)
:: %cplx :: BLAS-compatible packed floats
:: %unum :: unum/posit @ruw, @ruh, @rub
:: %fixp :: fixed-precision (/lib/fixed)
==
::
+$ baum :: $baum: ndray with metadata
$: =meta ::
data=ndray ::
==
::
+$ ndray :: $ndray: n-dim array as nested list
$@ @ :: single item
(list ndray) :: nonempty list of children, in row-major order
::
+$ slice (unit [(unit @) (unit @)])
--
Loading