aclrtRandomParaInfo

typedef struct {
    uint8_t isAddr;
    uint8_t valueOrAddr[8];
    uint8_t size;
    uint8_t rsv[6];
} aclrtRandomParaInfo;

Member

Description

isAddr

Whether to store the parameter value or the memory address that points to the parameter value. 0 indicates that the parameter value is stored. 1 indicates that the memory address that points to the parameter value is stored.

valueOrAddr

Stores the parameter value or the memory address that points to the parameter value.

When isAddr is set to 0, fill in the corresponding number of bytes based on the data type. For example, for fp16 and bf16, fill in the first two bytes; for fp32, uint32, and int32, fill in the first four bytes; for uint64 and int64, fill in eight bytes.

When isAddr is set to 1, fill in the 8-byte memory address.

size

Number of bytes actually filled in valueOrAddr.

rsv

Reserved. The value is fixed at 0.