MATLAB PARALLEL COMPUTING TOOLBOX - S Guia do Utilizador Página 288

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
Vista de página 287
9 GPU Computing
9-30
4
Before you run the kernel, set the number of threads correctly for the vectors you
want to add.
N = 128;
k.ThreadBlockSize = N;
in1 = ones(N,1,'gpuArray');
in2 = ones(N,1,'gpuArray');
result = feval(k,in1,in2);
Example with CU and PTX Files
For an example that shows how to work with CUDA, and provides CU and PTX files
for you to experiment with, see Illustrating Three Approaches to GPU Computing: The
Mandelbrot Set.
Vista de página 287
1 2 ... 283 284 285 286 287 288 289 290 291 292 293 ... 655 656

Comentários a estes Manuais

Sem comentários