MATLAB PARALLEL COMPUTING TOOLBOX - S Uživatelská příručka Strana 288

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 656
  • Tabulka s obsahem
  • ŘEŠENÍ PROBLÉMŮ
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 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.
Zobrazit stránku 287
1 2 ... 283 284 285 286 287 288 289 290 291 292 293 ... 655 656

Komentáře k této Příručce

Žádné komentáře