@@ -1917,6 +1917,129 @@ typedef struct CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st {
19171917 unsigned int reserved [16 ];
19181918} CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS ;
19191919
1920+ typedef unsigned long long CUmemGenericAllocationHandle ;
1921+
1922+ typedef enum CUgraphExecUpdateResult_enum {
1923+ CU_GRAPH_EXEC_UPDATE_SUCCESS = 0x0 , /**< The update succeeded */
1924+ CU_GRAPH_EXEC_UPDATE_ERROR =
1925+ 0x1 , /**< The update failed for an unexpected reason which is described in
1926+ the return value of the function */
1927+ CU_GRAPH_EXEC_UPDATE_ERROR_TOPOLOGY_CHANGED =
1928+ 0x2 , /**< The update failed because the topology changed */
1929+ CU_GRAPH_EXEC_UPDATE_ERROR_NODE_TYPE_CHANGED =
1930+ 0x3 , /**< The update failed because a node type changed */
1931+ CU_GRAPH_EXEC_UPDATE_ERROR_FUNCTION_CHANGED =
1932+ 0x4 , /**< The update failed because the function of a kernel node changed
1933+ */
1934+ CU_GRAPH_EXEC_UPDATE_ERROR_PARAMETERS_CHANGED =
1935+ 0x5 , /**< The update failed because the parameters changed in a way that
1936+ is not supported */
1937+ CU_GRAPH_EXEC_UPDATE_ERROR_NOT_SUPPORTED =
1938+ 0x6 /**< The update failed because something about the node is not
1939+ supported */
1940+ } CUgraphExecUpdateResult ;
1941+
1942+ /**
1943+ * Defines the allocation types available
1944+ */
1945+ typedef enum CUmemAllocationType_enum {
1946+ CU_MEM_ALLOCATION_TYPE_INVALID = 0x0 ,
1947+
1948+ /** This allocation type is 'pinned', i.e. cannot migrate from its current
1949+ * location while the application is actively using it
1950+ */
1951+ CU_MEM_ALLOCATION_TYPE_PINNED = 0x1 ,
1952+ CU_MEM_ALLOCATION_TYPE_MAX = 0xFFFFFFFF
1953+ } CUmemAllocationType ;
1954+
1955+ /**
1956+ * Flags for specifying particular handle types
1957+ */
1958+ typedef enum CUmemAllocationHandleType_enum {
1959+ CU_MEM_HANDLE_TYPE_POSIX_FILE_DESCRIPTOR =
1960+ 0x1 , /**< Allows a file descriptor to be used for exporting. Permitted
1961+ only on POSIX systems. (int) */
1962+ CU_MEM_HANDLE_TYPE_WIN32 =
1963+ 0x2 , /**< Allows a Win32 NT handle to be used for exporting. (HANDLE) */
1964+ CU_MEM_HANDLE_TYPE_WIN32_KMT = 0x4 , /**< Allows a Win32 KMT handle to be used
1965+ for exporting. (D3DKMT_HANDLE) */
1966+ CU_MEM_HANDLE_TYPE_MAX = 0xFFFFFFFF
1967+ } CUmemAllocationHandleType ;
1968+
1969+ /**
1970+ * Specifies the type of location
1971+ */
1972+ typedef enum CUmemLocationType_enum {
1973+ CU_MEM_LOCATION_TYPE_INVALID = 0x0 ,
1974+ CU_MEM_LOCATION_TYPE_DEVICE =
1975+ 0x1 , /**< Location is a device location, thus id is a device ordinal */
1976+ CU_MEM_LOCATION_TYPE_MAX = 0xFFFFFFFF
1977+ } CUmemLocationType ;
1978+
1979+ /**
1980+ * Specifies a location for an allocation.
1981+ */
1982+ typedef struct CUmemLocation_st {
1983+ CUmemLocationType type ; /**< Specifies the location type, which modifies the
1984+ meaning of id. */
1985+ int id ; /**< identifier for a given this location's ::CUmemLocationType. */
1986+ } CUmemLocation ;
1987+
1988+ /**
1989+ * Specifies the allocation properties for a allocation.
1990+ */
1991+ typedef struct CUmemAllocationProp_st {
1992+ /** Allocation type */
1993+ CUmemAllocationType type ;
1994+ /** requested ::CUmemAllocationHandleType */
1995+ CUmemAllocationHandleType requestedHandleTypes ;
1996+ /** Location of allocation */
1997+ CUmemLocation location ;
1998+ /**
1999+ * Windows-specific LPSECURITYATTRIBUTES required when
2000+ * ::CU_MEM_HANDLE_TYPE_WIN32 is specified. This security attribute defines
2001+ * the scope of which exported allocations may be tranferred to other
2002+ * processes. In all other cases, this field is required to be zero.
2003+ */
2004+ void * win32HandleMetaData ;
2005+ /** Reserved for future use, must be zero */
2006+ unsigned long long reserved ;
2007+ } CUmemAllocationProp ;
2008+
2009+ /**
2010+ * Flag for requesting different optimal and required granularities for an
2011+ * allocation.
2012+ */
2013+ typedef enum CUmemAllocationGranularity_flags_enum {
2014+ CU_MEM_ALLOC_GRANULARITY_MINIMUM =
2015+ 0x0 , /**< Minimum required granularity for allocation */
2016+ CU_MEM_ALLOC_GRANULARITY_RECOMMENDED =
2017+ 0x1 /**< Recommended granularity for allocation for best performance */
2018+ } CUmemAllocationGranularity_flags ;
2019+
2020+ /**
2021+ * Specifies the memory protection flags for mapping.
2022+ */
2023+ typedef enum CUmemAccess_flags_enum {
2024+ CU_MEM_ACCESS_FLAGS_PROT_NONE =
2025+ 0x0 , /**< Default, make the address range not accessible */
2026+ CU_MEM_ACCESS_FLAGS_PROT_READ =
2027+ 0x1 , /**< Make the address range read accessible */
2028+ CU_MEM_ACCESS_FLAGS_PROT_READWRITE =
2029+ 0x3 , /**< Make the address range read-write accessible */
2030+ CU_MEM_ACCESS_FLAGS_PROT_MAX = 0xFFFFFFFF
2031+ } CUmemAccess_flags ;
2032+
2033+ /**
2034+ * Memory access descriptor
2035+ */
2036+ typedef struct CUmemAccessDesc_st {
2037+ CUmemLocation location ; /**< Location on which the request is to change it's
2038+ accessibility */
2039+ CUmemAccess_flags
2040+ flags ; /**< ::CUmemProt accessibility flags to set on the request */
2041+ } CUmemAccessDesc ;
2042+
19202043#ifdef __cplusplus
19212044}
19222045#endif
0 commit comments