CACHE_wbInvL2(cnew, mnew * nnew * sizeof(float), CACHE_FENCE_WAIT);
主核和从核一起处理数据,但是主核缓存了从核的部分数据,当主核处理完数据,进行cache写回失效,再从核处理数据写回,但是主核执行该函数并没有把数据写回,缓存中还存在脏数据,主核进行下一步处理时,主核还是用了缓存中的脏数据,并没有用从核写入内存的数据。
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
CACHE_wbInvL2(cnew, mnew * nnew * sizeof(float), CACHE_FENCE_WAIT);
主核和从核一起处理数据,但是主核缓存了从核的部分数据,当主核处理完数据,进行cache写回失效,再从核处理数据写回,但是主核执行该函数并没有把数据写回,缓存中还存在脏数据,主核进行下一步处理时,主核还是用了缓存中的脏数据,并没有用从核写入内存的数据。