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

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
Przeglądanie stron 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.
Przeglądanie stron 287
1 2 ... 283 284 285 286 287 288 289 290 291 292 293 ... 655 656

Komentarze do niniejszej Instrukcji

Brak uwag