发表于《调用GPU进行计算》
acmilan作者
10年1个月前修改于 10年1个月前IP:四川
827098
3楼

除了[RW]StructuredBuffer以外,DirectX 11 Compute Shader还支持[RW]ByteAddressBuffer,可以实现非结构化数据访问,不过使用比较麻烦,应用也比较少,这里就不介绍了,感兴趣的可以看一下微软官方示例中的BasicCompute11子示例。

上述双调排序程序中使用了GroupMemoryBarrierWithGroupSync函数,它可以等待组内所有共享数据访问结束,且所有程序均到达此调用。HLSL还提供了一些相似用途的函数:

AllMemoryBarrier
AllMemoryBarrierWithGroupSync
DeviceMemoryBarrier
DeviceMemoryBarrierWithGroupSync
GroupMemoryBarrier
GroupMemoryBarrierWithGroupSync
InterlockedAdd
InterlockedAnd
InterlockedCompareExchange
InterlockedCompareStore
InterlockedExchange
InterlockedMax
InterlockedMin
InterlockedOr
InterlockedXor
评论
文号 / 827098

千古风流
名片发私信
学术分 4
总主题 466 帖总回复 2942 楼拥有证书:进士 学者 笔友
注册于 2009/05/30 21:22:42最后登录 2019/01/31 17:16:38
主体类型:个人
所属领域:无
认证方式:邮箱
IP归属地:0

个人简介

暂未填写
笔记
{{note.content}}
{{n.user.username}}
{{fromNow(n.toc)}} {{n.status === noteStatus.disabled ? "已屏蔽" : ""}} {{n.status === noteStatus.unknown ? "正在审核" : ""}} {{n.status === noteStatus.deleted ? '已删除' : ''}}
  • 编辑
  • 删除
  • {{n.status === 'disabled' ? "解除屏蔽" : "屏蔽" }}
我也是有底线的