C-contiguous fashion在caffe blob存储中意味着什么?

what does C-contiguous fashion mean in caffe blob storage?

在caffe文档中:http://caffe.berkeleyvision.org/tutorial/net_layer_blob.html

Blob storage and communication# A Blob is a wrapper over the actual data being processed and passed along by Caffe, and also under the hood provides synchronization capability between the CPU and the GPU. Mathematically, a blob is an N-dimensional array stored in a C-contiguous fashion.

它表示 blob 以 C 连续方式 存储。 C-contiguous fashion 是什么意思?

C 连续方式,与 Fortran 方式(也被 Matlab 使用)相反。这意味着 n-dim 数据在内存中存储为一个长且连续的数组。元素在内存中的顺序是按照 C 风格:尾部维度先存储。也就是说,如果你有 c x h x w 3d blob,内存中的行将一个接一个地保存,并且在完成第一个通道的所有行之后,才写入下一个通道的行。

另一种看待它的方式是i,j,k元素存储在

  blob[i*w*h + j*w + k]

有关详细信息,请参阅 this wiki page