MATLAB PARALLEL COMPUTING TOOLBOX - S Guía de usuario Pagina 288

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 656
  • Tabla de contenidos
  • SOLUCIÓN DE PROBLEMAS
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 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 pagina 287
1 2 ... 283 284 285 286 287 288 289 290 291 292 293 ... 655 656

Comentarios a estos manuales

Sin comentarios