diff options
author | Determinant <[email protected]> | 2015-05-22 12:13:37 +0800 |
---|---|---|
committer | Determinant <[email protected]> | 2015-05-22 12:13:37 +0800 |
commit | 0b128e097d425418499ab2257c5448f14fec3215 (patch) | |
tree | 80adc5a54ef29abeb95bd0cdf59d1d19c4aa2023 /matrix/init.lua | |
parent | 8f18aaba322cf717b8805ebfcacb5a3108d3dda8 (diff) |
...
Diffstat (limited to 'matrix/init.lua')
-rw-r--r-- | matrix/init.lua | 6 |
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 |