.. _subsec:library_constants: Library Constants ================= The NVSHMEM library provides a set of compile-time constants that may be used to specify options to API routines, provide implementation-specific parameters, or return information about the implementation. .. c:var:: NVSHMEM_THREAD_SINGLE The NVSHMEM thread support level which specifies that the program must not be multithreaded. See Section :ref:`subsec:thread_support` for more detail about its use. .. c:var:: NVSHMEM_THREAD_FUNNELED The NVSHMEM thread support level which specifies that the program may be multithreaded but must ensure that only the main thread invokes the NVSHMEM interfaces. See Section :ref:`subsec:thread_support` for more detail about its use. .. c:var:: NVSHMEM_THREAD_SERIALIZED The NVSHMEM thread support level which specifies that the program may be multithreaded but must ensure that the NVSHMEM interfaces are not invoked concurrently by multiple threads. See Section :ref:`subsec:thread_support` for more detail about its use. .. c:var:: NVSHMEM_THREAD_MULTIPLE The NVSHMEM thread support level which specifies that the program may be multithreaded and any thread may invoke the NVSHMEM interfaces. See Section :ref:`subsec:thread_support` for more detail about its use. .. c:var:: NVSHMEM_TEAM_INVALID A value corresponding to an invalid team. This value can be used to initialize or update team handles to indicate that they do not reference a valid team. When managed in this way, applications can use an equality comparison to test whether a given team handle references a valid team. .. c:var:: NVSHMEM_SYNC_VALUE The value used to initialize the elements of *pSync* arrays. The value of this constant is implementation specific. See Section :ref:`subsec:coll` for more detail about its use. .. c:var:: NVSHMEM_SYNC_SIZE Length of a work array that can be used with any NVSHMEM collective communication operation. Work arrays sized for specific operations may consume less memory. The value of this constant is implementation specific. See Section :ref:`subsec:coll` for more detail about its use. .. c:var:: NVSHMEM_BCAST_SYNC_SIZE Length of the *pSync* arrays needed for broadcast routines. The value of this constant is implementation specific. See Section :ref:`subsec:shmem_broadcast` for more detail about its use. .. c:var:: NVSHMEM_REDUCE_SYNC_SIZE Length of the work arrays needed for reduction routines. The value of this constant is implementation specific. See Section :ref:`subsec:shmem_reductions` for more detail about its use. .. c:var:: NVSHMEM_BARRIER_SYNC_SIZE Length of the work array needed for barrier routines. The value of this constant is implementation specific. See Section :ref:`subsec:shmem_barrier` for more detail about its use. .. c:var:: NVSHMEM_COLLECT_SYNC_SIZE Length of the work array needed for collect routines. The value of this constant is implementation specific. See Section :ref:`subsec:shmem_collect` for more detail about its use. .. c:var:: NVSHMEM_ALLTOALL_SYNC_SIZE Length of the work array needed for *nvshmem_alltoall* routines. The value of this constant is implementation specific. See Section :ref:`subsec:shmem_alltoall` for more detail about its use. .. c:var:: NVSHMEM_REDUCE_MIN_WRKDATA_SIZE Minimum length of work arrays used in various collective routines. .. c:var:: NVSHMEM_MAJOR_VERSION Integer representing the major version of OpenSHMEM Specification in use. .. c:var:: NVSHMEM_MINOR_VERSION Integer representing the minor version of OpenSHMEM Specification in use. .. c:var:: NVSHMEM_MAX_NAME_LEN Integer representing the maximum length of *NVSHMEM_VENDOR_STRING*. .. c:var:: NVSHMEM_VENDOR_STRING String representing vendor defined information of size at most *NVSHMEM_MAX_NAME_LEN*. In *C/C++*, the string is terminated by a null character. .. c:var:: NVSHMEM_CMP_EQ An integer constant expression corresponding to the “equal to” comparison operation. See Section :ref:`subsec:p2p_intro` for more detail about its use. .. c:var:: NVSHMEM_CMP_NE An integer constant expression corresponding to the “not equal to” comparison operation. See Section :ref:`subsec:p2p_intro` for more detail about its use. .. c:var:: NVSHMEM_CMP_LT An integer constant expression corresponding to the “less than” comparison operation. See Section :ref:`subsec:p2p_intro` for more detail about its use. .. c:var:: NVSHMEM_CMP_LE An integer constant expression corresponding to the “less than or equal to” comparison operation. See Section :ref:`subsec:p2p_intro` for more detail about its use. .. c:var:: NVSHMEM_CMP_GT An integer constant expression corresponding to the “greater than” comparison operation. See Section :ref:`subsec:p2p_intro` for more detail about its use. .. c:var:: NVSHMEM_CMP_GE An integer constant expression corresponding to the “greater than or equal to” comparison operation. See Section :ref:`subsec:p2p_intro` for more detail about its use.