Tuples¶
Predefined Functions on Tuples.
Tuples are a predefined structured type in Chapel. They are specified in the Tuples chapter of the Chapel Language Specification. This page lists the predefined functions on tuples. They are always available to all Chapel programs.
Besides the functions defined here, the Chapel Language specification defines other operations available on tuples: indexing, iteration, assignment, and unary, binary, and relational operators.
The following method is also availble:
proc tuple.size param
It returns the number of components of the tuple.
- proc isTupleType(type t) param¶
Returns true if its argument is a tuple type. The argument must be a type.
- proc isHomogeneousTupleType(type t) param¶
Returns true if its argument is a homogeneous tuple type. The argument must be a type.
- proc max(type t): t¶
Returns a tuple of type t with each component set to max of the type in the corresponding component of the argument.
- proc min(type t): t¶
Returns a tuple of type t with each component set to min of the type in the corresponding component of the argument.