MATLAB PARALLEL COMPUTING TOOLBOX - S Podręcznik Użytkownika Strona 567

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
Przeglądanie stron 566
parallel.gpu.CUDAKernel
11-223
int idx = blockIdx.x * blockDim.x + threadIdx.x;
if (idx < vecLen) {
pi[idx] += c;
}
and simpleEx.ptx contains the PTX resulting from compiling simpleEx.cu into
PTX, both of the following statements return a kernel object that you can use to call the
addToVector CUDA kernel.
kern = parallel.gpu.CUDAKernel('simpleEx.ptx', ...
'simpleEx.cu');
kern = parallel.gpu.CUDAKernel('simpleEx.ptx', ...
'float *, float, int');
See Also
arrayfun | feval | existsOnGPU | gpuArray | reset
Przeglądanie stron 566
1 2 ... 562 563 564 565 566 567 568 569 570 571 572 ... 655 656

Komentarze do niniejszej Instrukcji

Brak uwag