Details of tensor operation implementation
Details of tensor operation implementation
(binary-op! dest alpha x beta y op options)
Perform the operation: dest = alpha * x op beta * y. x or y may be a scalar, dest must not be. Datatypes must match.
Perform the operation: dest = alpha * x op beta * y. x or y may be a scalar, dest must not be. Datatypes must match.
(ternary-op! dest alpha x beta y gamma z op options)
Perform the elementwise operation dest = op( alpha * x, beta * y, gamma * z ) dest tensor and must not alias any other arguments. There is no accumulator version of these operations at this time in order to keep kernel permutations low (3 backend permutations).
x, y, z can be constants or tensors.
operations: select: dest = (if (>= x 0) y z)
Perform the elementwise operation dest = op( alpha * x, beta * y, gamma * z ) dest tensor and must not alias any other arguments. There is no accumulator version of these operations at this time in order to keep kernel permutations low (3 backend permutations). x, y, z can be constants or tensors. operations: select: dest = (if (>= x 0) y z)
Multimethods for typed assignment.
Multimethods for typed assignment.
Binary operations may contain one or two scalars in various positions. This multimethod disambiguates between those positions.
Binary operations may contain one or two scalars in various positions. This multimethod disambiguates between those positions.
(unary-op! dest alpha x op options)
dest[idx] = op(alpha * x)
dest[idx] = op(alpha * x)
(unary-reduce! output alpha input op options)
Vector operations operate across the last dimension and produce 1 result. output = op((alpha*input)) Output must be a [xyz 1] tensor while input is an [xyz n] tensor; the reduction will occur across the n axis with the results placed in output. The leading dimensions of both vectors must match.
Vector operations operate across the last dimension and produce 1 result. output = op((alpha*input)) Output must be a [xyz 1] tensor while input is an [xyz n] tensor; the reduction will occur across the n axis with the results placed in output. The leading dimensions of both vectors must match.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close