Templates
template gen_cl_apply2(kern_name, ctype, op: string): string
-
Generates an OpenCL kernel for an elementwise in-place binary infix operation (like +=, -=, *.= or /.=) Input:
- The C type
- The C kernel name (this only helps debugging the C code)
- The C operation (+=, -=, *.= or /.=)
template gen_cl_apply3(kern_name, ctype, op: string): string
-
Generates an OpenCL kernel for an elementwise binary infix operations (like +, -, ...) Input:
- The C type
- The C kernel name (this only helps debugging the C code)
- The C operation (+, -, ...)
template genClInfixOp(T: typedesc; ctype: string; procName: untyped; cName: string; cInfixOp: string; exported: static[bool] = true): untyped
-
Generates binding to an OpenCL kernel for an elementwise binary infix operation (like +, -, ...) Input:
- The Nim type of the elements of the input tensors
- The equivalent C type
- The Nim identifier of the resulting proc
- The C kernel name (this only helps debugging the C code)
- The C operation (+, -, ...)
template genClInPlaceOp(T: typedesc; ctype: string; procName: untyped; cName: string; cInfixOp: string; exported: static[bool] = true): untyped
-
Generates an OpenCL kernel for an elementwise in-place binary infix operation (like +=, -=, *.= or /.=) Input:
- The Nim type of the elements of the input tensors
- The equivalent C type
- The Nim identifier of the resulting proc
- The C kernel name (this only helps debugging the C code)
- The C operation (+=, -=, *.= or /.=)