Okay, let's have a quick quiz. So, which of these statements has a coalesced access pattern?
Here's a simple kernel foo--it takes a pointer to global memory g.
And as a shortcut, I'm going to define a as 3.14 and i as thread index dot x.
So now, each of these statements either reads or writes g or both.
And I'd like you to tell me, in each case,
whether the accesses to g follow a coalesced access pattern.
好的,我们来做个快速测验。那么,这些语句中,哪一个有合并存取模式?
这是一个简单的内核foo —用指针指向全局内存g。
为了快捷,我将a 定义为3.14 ,i 定义为threadIdx.x。
所以现在,每个语句读取g,或者写入g,或者二者都有。
那么我想请你告诉我,在每个例子中,
存取g 是否遵循合并存取模式。