Does CAL copy elements from cpu to gpu one by one?

Discussion created by zellux on Jun 9, 2008
Latest reply on Jun 27, 2008 by Nexis

I wrote a program to test whether it was true.

My program worked like this

calResMap((CALvoid**)&fdata, &pitch, inputRes, 0);
for (int i = 0; i < LENGTH; ++i) {
    fdata[index] = inputData;

The inputData[] array was initialized with random floats, and index[] array determined how data are transferred to GPU (sequentially or randomly). The LENGTH is set to 300, 000

At the first run, it copied an array of floating points to GPU sequentially, i.e, index = i

In the second run, it copied the same data to GPU in a random order, i.e, index is first random_shuffled.

But it seemed that both run consumed nearly the same time. Does that mean CAL copy floats to gpu one by one?

Can I make it copy a chunk of data to GPU simutaneously with an operation like DMA, in order to improve performance?

Many thanks.