Skip to content

Conversation

@Ceng23333
Copy link

No description provided.

#### 映射虚拟内存

``` c++
infiniStatus_t infinirtMapVirtualMem(void **mapped_ptr, infinirtVirtualMem_t vm, size_t offset, infinirtPhyMem_t phy_mem);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mapped_ptr这个参数有点冗余。讲清楚virtualmem_t要怎么转成可使用的void*就行了

#### 解除虚拟内存映射
``` c++
infiniStatus_t infinirtUnmapVirtualMem(infinirtVirtualMem_t vm, size_t offset);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

去掉offset,加上size

#### 类型定义
``` c++
typedef void *infinirtDeviceptr_t; // 设备指针类型
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

去掉infinirtDeviceptr_t infinirtVirtualMem_t,直接用void*

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants