Report a bug
If you spot a problem with this page, click here to create a Bugzilla issue.
Improve this page
Quickly fork, edit online, and submit a pull request for this page. Requires a signed-in GitHub account. This works well for small changes. If you'd like to make larger changes you may want to consider using a local clone.

core.internal.array.operations

This module contains support array (vector) operations
License:
Distributed under the Boost Software License 1.0. (See accompanying file LICENSE)
@trusted T[] arrayOp(T : T[], Args...)(T[] res, Filter!(isType, Args) args);
Perform array (vector) operations and store the result in res. Operand types and operations are passed as template arguments in Reverse Polish Notation (RPN).
Operands can be slices or scalar types. The element types of all slices and all scalar types must be implicitly convertible to T.
Operations are encoded as strings, e.g. "+", "%", "*=". Unary operations are prefixed with "u", e.g. "u-", "u~". Only the last operation can and must be an assignment ("=") or op-assignment ("op=").
All slice operands must have the same length as the result slice.
Parameters:
Args operand types and operations in RPN
T[] res the slice in which to store the results
Filter!(isType, Args) args operand values
Returns:
the slice containing the result