Skip to content

Tutorial: Operators and Ext Module

Liang Wang edited this page May 1, 2017 · 19 revisions

This tutorial will go through the operators and Ext module. The operators in Owl are implemented using functors. However, you do not need to work with functors directly in order to use the operators.

Basic Operators

The operators have been included in each Ndarray and Matrix module. The following table summarises the operators currently implemented in Owl.

Operator Example Operation Dense/Sparse Ndarray/Matrix
+ x + y element-wise add both both
- x - y element-wise sub both both
* x * y element-wise mul both both
/ x / y element-wise div both both
+ x + y element-wise add both both