aboutsummaryrefslogtreecommitdiff
path: root/cumatrix_example.lua
diff options
context:
space:
mode:
authorDeterminant <[email protected]>2015-05-15 03:13:31 +0800
committerDeterminant <[email protected]>2015-05-15 03:13:31 +0800
commit902faa66e3da52a1a4cf7b1dc7da6e6bf0d47d34 (patch)
treed3c5bad9e01ecc13a510fd552b97b080e70c38ad /cumatrix_example.lua
parentd77baabfd42d169c2cf7318b770c1f2547ebe17d (diff)
add cumatrix
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)