Next: , Previous: Creating and destroying lattice fields, Up: QDP Functions


4.5 Subsets

All QDP linear algebra and shift operations require specifying the subset of the lattice on which the operation is performed. The subset may be the entire lattice. When defining subsets, it is often convenient to partition the lattice into multiple disjoint subsets (e.g. time slices or checkerboards). Such subsets are defined through a user-supplied function that returns a range of integers 0,1,2,...,n-1 so that if f(x) = i, then site x is in partition i. A single subset may also be defined by limiting the range of return values to a single value (i.e. 0). This procedure may be called more than once, and sites may be assigned to more than one subset. Thus, for example an even site may also be assigned to a time slice subset and one of the subsets in a 32-level checkerboard scheme. A subset definition remains valid until QDP_destroy_subset is called.