CUmemLocation_v1 Struct Reference
The struct reference describes the
int id
Member as:
“identifier for a given this location’s CUmemLocationType.”
This sentence is missing a word. I believe it should read:
“identifier for a device given this location’s CUmemLocationType.”
Is this guess correct? If not, then what is the id member for?
The location type modifies the meaning of id
. Depending on location type, you can see some of the possible meanings of id here.
CU_MEM_LOCATION_TYPE_INVALID = 0x0
CU_MEM_LOCATION_TYPE_DEVICE = 0x1
Location is a device location, thus id is a device ordinal
CU_MEM_LOCATION_TYPE_HOST = 0x2
Location is host, id is ignored
CU_MEM_LOCATION_TYPE_HOST_NUMA = 0x3
Location is a host NUMA node, thus id is a host NUMA node id
CU_MEM_LOCATION_TYPE_HOST_NUMA_CURRENT = 0x4
Location is a host NUMA node of the current thread, id is ignored
CU_MEM_LOCATION_TYPE_MAX = 0x7FFFFFFF
Aha that makes sense. Thanks for response.