Intel® C++ Compiler 16.0 User and Reference Guide

__cilkrts_get_pedigree

__cilkrts_get_pedigree(void);

This function returns the latest significant node in the current pedigree.

Intel® Cilk™ Plus identifies a strand of execution by a pedigree, a sequence of 64-bit integers that reflects the history of spawns and syncs in the computation leading up to that strand. Two strands always have distinct pedigrees. The current pedigree for a strand will change at each cilk_spawn, cilk_sync, or cilk_for, and will be different in each grain of a cilk_for loop. The current pedigree also changes after any call to __clkrts_bump_worker_rank().

The pedigree is represented as a linked list of pedigree nodes, each of type __cilkrts_pedigree. This list is singly linked and stores the pedigree nodes in reverse order, that is, from the least significant node to the most significant node. Each pedigree node is a structure containing a 64-bit integer rank and a const "parent" pointer to the next (more significant) pedigree node, or null if the node is the end of the list. The return value of this function is a copy of the least significant node of the current pedigree, that is, the head of the list.

In a serial execution of a program, the pedigrees increase lexicographically at each strand transition. In any parallel execution of the same program that generates the same set of strands as the serial execution, the pedigrees of the corresponding strands in the two executions should match.

The following guidelines apply to __cilkrts_get_pedigree():