summaryrefslogtreecommitdiff
path: root/matrix/init.lua
diff options
context:
space:
mode:
authorDeterminant <[email protected]>2015-05-22 12:13:37 +0800
committerDeterminant <[email protected]>2015-05-22 12:13:37 +0800
commit0b128e097d425418499ab2257c5448f14fec3215 (patch)
tree80adc5a54ef29abeb95bd0cdf59d1d19c4aa2023 /matrix/init.lua
parent8f18aaba322cf717b8805ebfcacb5a3108d3dda8 (diff)
...
Diffstat (limited to 'matrix/init.lua')
-rw-r--r--matrix/init.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/matrix/init.lua b/matrix/init.lua
index c33cf7e..8f626dc 100644
--- a/matrix/init.lua
+++ b/matrix/init.lua
@@ -32,3 +32,9 @@ function nerv.CuMatrix:__sub__(b)
c:add(self, b, 1.0, -1.0)
return c
end
+
+function nerv.CuMatrix:__mul__(b)
+ c = self:create()
+ c:mul(self, b, 'N', 'N')
+ return c
+end