Arithmetic Operators

From Jacket Wiki

(Redirected from MTIMES)
Jump to: navigation, search
Back to Function List, Jacket DLA, Jacket SLA

Matrix and array arithmetic

Usage

Jacket for M Language
    Supported Syntax
    
A+B
plus(A,B)
A-B
minus(A,B)
A*B
mtimes(A,B)
A.*B
times(A,B)
A/B
mrdivide(A,B)
A./B
rdivide(A,B)
A\B
mldivide(A,B)
A.\B
ldivide(A,B)
A^B
mpower(A,B)
A.^B
power(A,B)
A'
ctranspose(A)
A.'
transpose(A)
    

GFOR Supported

Yes

GCOMPILE Supported

Yes

Types Supported

-  GDOUBLE   GSINGLE   GLOGICAL   GINT32   INT8   GUINT32   GUINT8   COMPLEX 

Types Not Supported

-

CPU usageJacket only contains GPU computing functions. To run functions on the CPU, try one of the MathWorks products:
http://www.mathworks.com/access/helpdesk/help/techdoc/ref/arithmeticoperators.html

http://www.mathworks.com/access/helpdesk/help/techdoc/ref/mtimes.html
http://www.mathworks.com/access/helpdesk/help/techdoc/ref/mrdivide.html
http://www.mathworks.com/access/helpdesk/help/techdoc/ref/rdivide.html
http://www.mathworks.com/access/helpdesk/help/techdoc/ref/mldivide.html
http://www.mathworks.com/access/helpdesk/help/techdoc/ref/ldivide.html

http://www.mathworks.com/access/helpdesk/help/techdoc/ref/power.html

Notes

  • / - Matrix Right Divide (MRDIVIDE) - B is restricted to scalars.
  • \ - Matrix Left Divide (MLDIVIDE) - Does not support empty inputs.
  • \ - Matrix Left Divide (MLDIVIDE) - For M<N, CPU-based MATLAB returns a solution with the maximum number of trailing zeros. On the other hand, the LAPACK function SGELS returns a minimum norm solution, which is what Jacket returns for MLDIVIDE on the GPU. Therefore, it is important to adjust for this difference as needed.
  • ^ - Matrix Power (MPOWER) - Inputs must be non-sparse and square. The power must be a MATLAB scalar.
  • With Base Jacket, MLDIVIDE and MPOWER are supported for real, single inputs only. MPOWER is supported for positive powers only.
  • With Jacket DLA, MLDIVIDE and MPOWER are supported for single and double precision and for real and complex inputs. MPOWER is supported for positive and negative powers.
  • With Jacket SLA, MTIMES, TRANSPOSE and CTRANSPOSE are supported for sparse matrices.
    • MTIMES is only supported for A * B when A is sparse, B is dense.
  • Check out some MTIMES benchmarks using Jacket
  • When used with GCOMPILE all arithmetic operations are performed element-wise.

See Also

CHOL, DET, INV, LU, ORTH, PERMUTE, IPERMUTE, QR, RREF, LINSOLVE, NTHROOT, REALPOW

Personal tools