aclrtRandomNumTaskInfo

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
typedef struct { 
    aclDataType dataType; 
    aclrtRandomNumFuncParaInfo randomNumFuncParaInfo;
    void *randomParaAddr;  
    void *randomResultAddr; 
    void *randomCounterAddr;
    aclrtRandomParaInfo randomSeed; 
    aclrtRandomParaInfo randomNum; 
    uint8_t rsv[8]; 
} aclrtRandomNumTaskInfo;

Member

Description

dataType

Random number data type. For details about the type definition, see aclDataType.

Only the following data types are supported: ACL_INT32, ACL_INT64, ACL_UINT32, ACL_UINT64, ACL_BF16, ACL_FLOAT16, and ACL_FLOAT.

randomNumFuncParaInfo

Random number function information, including the function type and parameter information. For details about the type definition, see aclrtRandomNumFuncParaInfo.

randomParaAddr

If NULL is passed, the API internally allocates the device memory to store the data in the randomNumFuncParaInfo parameter. Otherwise, the user allocates the device memory and passes the memory address as an input.

randomResultAddr

Memory address for storing random number results.

The user allocates the device memory in advance and passes the memory address as an input.

randomCounterAddr

Offset generated for random numbers.

The user allocates the device memory in advance, reads the offset data, and then passes the memory address as an input.

randomSeed

Random seed. For details about the type definition, see aclrtRandomParaInfo.

randomNum

Number of random numbers. For details about the type definition, see aclrtRandomParaInfo.

rsv

Reserved. The value is fixed at 0.