aboutsummaryrefslogtreecommitdiff
path: root/cumatrix_example.lua
diff options
context:
space:
mode:
Diffstat (limited to 'cumatrix_example.lua')
-rw-r--r--cumatrix_example.lua10
1 files changed, 10 insertions, 0 deletions
diff --git a/cumatrix_example.lua b/cumatrix_example.lua
new file mode 100644
index 0000000..4b6fb4a
--- /dev/null
+++ b/cumatrix_example.lua
@@ -0,0 +1,10 @@
+t = nerv.FloatCuMatrix(10, 20)
+print(t)
+a = t[1]
+for i = 0, 9 do
+ for j = 0, 19 do
+ t[i][j] = i + j
+ end
+end
+print(t)
+print(a)