CUDA Libraries and MPI+OpenMP+CUDA - Prace Training Portal
CUDA Libraries and MPI+OpenMP+CUDA - Prace Training Portal
CUDA Libraries and MPI+OpenMP+CUDA - Prace Training Portal
- No tags were found...
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
<strong>CUDA</strong> ADDUSDENS – Code Snippet (C)for( ih = 0, iih = 1; ih < nh[nt - 1]; ih++, iih++) {for( jh = ih, jjh = iih; jh < nh[nt - 1]; jh++, jjh++, ijh++ ) {qvan2_(ptr_ngm, &iih, &jjh, ptr_nt, qmod, qgm, ylmk0);/* Protective guard */cudaDeviceSynchronize();qecudaSafeCall(cudaMemcpy( qgm_D, qgm, sizeof( double ) * ngm * 2, cudaMemcpyHostToDevice ));}}kernel_compute_aux( eigts1_D, eigts2_D, eigts3_D, ig1_D,ig2_D, ig3_D, nr1, nr2, nr3, qgm_D, becsum_D, aux_D, na, nspin_mag, ngm,first_becsum, ijh, nat, ityp_D, nt );qecudaGetLastError("kernel launch failure");qecudaSafeCall( cudaMemcpy( aux, aux_D, sizeof( double ) * ( ngm * nspin_mag * 2 ),cudaMemcpyDeviceToHost ) );February 10, 2012 PRACE Winter School 201249