运算符替换
使用代码替换工具或编程接口,定义标量和矩阵运算的代码替换映射。将矩阵运算替换为处理器代码或 BLAS 代码。控制数据的对齐方式。自定义代码匹配和替换过程。
工具
函数
主题
- Scalar Operator Code Replacement
Define code replacement mappings for scalar operators.
- Replace Addition and Subtraction Operator Code
Define code replacement mappings for addition and subtraction operations.
- Addition and Subtraction Algorithm Types for Code Replacement
Determine whether your operator algorithm is cast-before-operation or cast-after-operation for code replacement.
- Small Matrix Operation to Processor Code Replacement
Define code replacement mappings that replace nonscalar small matrix operations with processor-specific intrinsic functions.
- Matrix Multiplication Operation to MathWorks BLAS Code Replacement
Define code replacement mappings that replace nonscalar multiplication operations with Basic Linear Algebra subroutine (BLAS) multiplication functions
andx
gemm
.x
gemv - Matrix Multiplication Operation to ANSI/ISO C BLAS Code Replacement
Define code replacement mappings that replace nonscalar multiplication operations with ANSI®/ISO® C BLASBinary-Point-Only Scaling Code Replacement multiplication functions
andx
gemm
.x
gemv - Shift Left Operations and Code Replacement
Define code replacement mappings for code that the code generator produces for shift (<<) operations.