OpenACC的entire子句
-
使用openacc的annotate (entire())子句为什么没有起到作用,试了openacc手册51页中给出的例子,并在用swacc编译程序时带上了-ldmAnalyse参数,发现entire修饰的数组并没有存到LDM中去。
-
就是无锡超算官网上openacc手册中在介绍entire时给出的例子,51页是阅读器页码,手册打印页码是48页,难道示例本身就是错的?
-
查看中间代码
void slave_entire_6(void *argv) { int acc_cp_0_size; int acc_cp_1_size; acc_cp_0_size = 64 * 1 * 4; acc_cp_1_size = 256; acc_corenum = acc_get_num_threads(); acc_myid = acc_get_thread_num(); acc_check_ldm(0 + sizeof(_ldm_B) + sizeof(_ldm_i) + sizeof(_ldm_j) + sizeof(acc_data_ret) + sizeof(_ldm_A)); acc_ret = acc_sync_pe_m2l_nostride_copy(_ldm_A,A,acc_cp_0_size); { for (acc_blockindex_i0_0 = acc_myid * 1; acc_blockindex_i0_0 <= 127; acc_blockindex_i0_0 += 1 * acc_corenum) { for (_ldm_i = 0; _ldm_i <= 0; _ldm_i += 1) { for (_ldm_j = 0; _ldm_j <= 63; _ldm_j += 1) { _ldm_B[_ldm_i][_ldm_j] = _ldm_A[_ldm_j] + (_ldm_i + acc_blockindex_i0_0); } } _swacc_ret = acc_sync_pe_l2m_nostride_copy(&B[acc_blockindex_i0_0][0],_ldm_B[0],acc_cp_1_size); } } }
注意
acc_ret = acc_sync_pe_m2l_nostride_copy(_ldm_A,A,acc_cp_0_size);
这就是完全拷贝 A