PTX ISA 之 volatile 的用法

来源:互联网 发布:软件验收测试报告范文 编辑:程序博客网 时间:2024/06/07 02:30

字面意思

挥发性的,不稳定的

用法

用于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

0 0
原创粉丝点击