asm(
".reg .u32 t1,t2,t3;\n\t"
"ld.global.u32 t1, [%0+4]; \n\t"
"shl.b32 t1, %1, 2; \n\t"
"add.s32 t2,%0,t1; \n\t"
"mul.lo.u32 t1, %2, %2; \n\t"
"mul.lo.u32 t3, t1, %2; \n\t "
"st.global.u32 [%0+4], t3; "
:
:"r"(&d_ptr[elemID]) ,"r"(elemID),"r"(laneid)
);
배열에 대한 접근이.. 까다로운 cuda...
댓글 없음:
댓글 쓰기