aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/cumatrix_example.lua10
1 files changed, 8 insertions, 2 deletions
diff --git a/examples/cumatrix_example.lua b/examples/cumatrix_example.lua
index 084dcca..544fc7f 100644
--- a/examples/cumatrix_example.lua
+++ b/examples/cumatrix_example.lua
@@ -1,5 +1,5 @@
-m = 10
-n = 10
+m = 4
+n = 4
fm = nerv.CuMatrixFloat(m, n)
dm = nerv.CuMatrixDouble(m, n)
for i = 0, m - 1 do
@@ -23,3 +23,9 @@ print(fs + fs)
print(ds + ds)
print(fs - fs)
print(ds - ds)
+
+a = fs:create()
+a:mul_elem(fs, fs)
+print(a)
+a:log_elem(fs)
+print(a)