MIC中offload语法总结

MIC中offload的用法如下:

#pragma offload specifier [,specifier...]
specifier可以填入的选项为:
target  例:taget(mic:0)
if     例:if(N>100)
in    例:in(p:length(LEN) alloc_if(1))
out    例:out(p:length(LEN))
inout   例:inout(p:length(LEN) align(8))
nocopy  例:nocopy(p)
signal   例:signal(tag)
wait    例:wait(tag1,tag2)
mandatory   例:mandatory
其中in/out/inout/nocopy可用的属性有:
length  例::length(LEN)
alloc_if   例::alloc_if(1)
free__if  例::free_if(N>0)
align  例::align(8)
alloc   例::alloc(p[10:100]) 不能与inout/nocopy一起使用
into    例::into(p[10:100]) 不能与inout/nocopy一起使用

posted @ 2015-01-14 15:03  海上的风  阅读(285)  评论(0编辑  收藏  举报