---
title: aclrtRandomNumTaskInfo
description: "```"
url: https://www.hiascend.com/document/detail/zh/canncommercial/latest/API/runtimeapi/aclcppdevg_03_1931.html
sourcePath: /source/zh/canncommercial/900/API/runtimeapi/aclcppdevg_03_1931.html
indexId: d5196bf5c912e790d053c95affe45c881cf704bb1329ac453f5dfe533c015f4c68
---
# aclrtRandomNumTaskInfo

```
typedef struct { 
    aclDataType dataType; 
    aclrtRandomNumFuncParaInfo randomNumFuncParaInfo;
    void *randomParaAddr;  
    void *randomResultAddr; 
    void *randomCounterAddr;
    aclrtRandomParaInfo randomSeed; 
    aclrtRandomParaInfo randomNum; 
    uint8_t rsv[8]; 
} aclrtRandomNumTaskInfo;
```

| 成员名称 | 说明 |
| --- | --- |
| dataType | 随机数数据类型。类型定义请参见aclDataType。 仅支持如下数据类型：ACL\_INT32、ACL\_INT64、ACL\_UINT32、ACL\_UINT64、ACL\_BF16、ACL\_FLOAT16、ACL\_FLOAT。 |
| randomNumFuncParaInfo | 随机数函数信息，包括函数类别、参数信息。类型定义请参见aclrtRandomNumFuncParaInfo。 |
| randomParaAddr | 此处传NULL时，由接口内部自行申请Device内存，存放randomNumFuncParaInfo参数中的数据；否则，由用户申请Device内存，将内存地址作为参数传入。 |
| randomResultAddr | 存放随机数结果的内存地址。 由用户提前申请Device内存，将内存地址作为参数传入。 |
| randomCounterAddr | 生成随机数的偏移量。 由用户提前申请Device内存，读入偏移量数据后，再将内存地址作为参数传入 |
| randomSeed | 随机种子。类型定义请参见aclrtRandomParaInfo。 |
| randomNum | 随机数个数。类型定义请参见aclrtRandomParaInfo。 |
| rsv | 预留参数。当前固定配置为0。 |
