PTX ISA 之 volatile 的用法

字面意思

挥发性的,不稳定的

用法

用于ld/st指令
ld.volatile{.ss}.type d, [a]; // load from address 

ld.volatile{.ss}.vec.type d, [a]; // vector load from addr
An ld.volatile operation is always performed and it will not be reordered with respect to other volatile operations to the same memory location. volatile and non-volatile load operations to the same memory location may be reordered.

关于volatile 类型的顺序问题,同是volatile类型的对同一数据访问,是不可以重排序,与non-volatile的读操作是可以重排序的。

ld.volatile may be used only with .global and .shared spaces and with generic addressing, where the address points to .global or .shared space. Cache operations are not permitted with ld.volatile.

cache 操作是不允许使用volatile类型的,换句话说,此操作是不会caching 的,只能在内存中操作。

An st.volatile operation is always performed and it will not be reordered with respect to other volatile operations to the same memory location.

Generic addressing may be used with st.volatile. Cache operations are not permitted with st.volatile.

st 操作类似ld

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值