7.10. cudaDevResource Struct Reference

[Data types used by CUDA Runtime]

A tagged union describing different resources identified by the type field. This structure should not be directly modified outside of the API that created it.

‎ struct {
           enum cudaDevResourceType 
               type;
           union {
               struct cudaDevSmResource 
               sm;
               struct cudaDevWorkqueueConfigResource 
               wqConfig;
               struct cudaDevWorkqueueResource 
               wq;
           };
       };
  • If type is cudaDevResourceTypeInvalid, this resoure is not valid and cannot be further accessed.

  • If type is cudaDevResourceTypeSm, the cudaDevSmResource structure sm is filled in. For example, sm.smCount will reflect the amount of streaming multiprocessors available in this resource.

  • If type is cudaDevResourceTypeWorkqueueConfig, the cudaDevWorkqueueConfigResource structure wqConfig is filled in.

  • If type is cudaDevResourceTypeWorkqueue, the cudaDevWorkqueueResource structure wq is filled in.

Public Variables

struct cudaDevSmResource sm
enumcudaDevResourceType type
struct cudaDevWorkqueueResource wq
struct cudaDevWorkqueueConfigResource wqConfig

Variables

struct cudaDevSmResourcecudaDevResource::sm [inherited]

Resource corresponding to cudaDevResourceTypeSm type.

enumcudaDevResourceTypecudaDevResource::type [inherited]

Type of resource, dictates which union field was last set

struct cudaDevWorkqueueResourcecudaDevResource::wq [inherited]

Resource corresponding to cudaDevResourceTypeWorkqueue type.

struct cudaDevWorkqueueConfigResourcecudaDevResource::wqConfig [inherited]

Resource corresponding to cudaDevResourceTypeWorkqueueConfig type.