Closed
[Requirement|需求建议]: 新增按配置分配并识别内存的 Runtime7 单 Device 样例 #1065
YanxijiuAdd on Oct 9Closed at Oct 9
Oct 9 Added label: requirement
Oct 9 Associated pull request
Oct 9 Assign 2403_89963296 as responsible person
Oct 9 Modify description of issue
Oct 9 Close issue
Oct 9 Added label: resolved
Backgroud(背景信息)
Runtime7 内存样例需要补充“按配置分配并识别内存”的完整使用场景,帮助应用管理传输缓冲区,并正确处理异步任务与内存释放的关系。
新增路径:
example/1_basic_features/memory/17_configured_allocation。Origin(信息来源)
来自本次 Runtime7 样例完善需求,围绕以下公开 Runtime API 创建可运行样例:
aclrtCheckMemTypeaclrtFreeHostWithDevSyncaclrtFreeWithDevSyncaclrtMallocCachedaclrtMallocHostWithCfgaclrtMallocWithCfgaclrtPointerGetAttributesBenefit / Necessity (价值/作用)
演示按应用模块 ID 配置分配 Host/Device 缓冲区、根据内存属性选择复制方向、检查 Device 内存类型,并等待异步任务完成后释放内存。通过数据逐元素校验提供可以判断对错的结果。
Design(设计方案)