diff --git a/B3/L9/docs/gpu_lecture.md b/B3/L9/docs/gpu_lecture.md index a6ba8e6..9014872 100644 --- a/B3/L9/docs/gpu_lecture.md +++ b/B3/L9/docs/gpu_lecture.md @@ -1019,7 +1019,7 @@ end do # Interoperability with libraries (BONUS) - + - Often it may be useful to integrate the accelerated OpenACC code with other accelerated libraries - MPI, CUBLAS, CUFFT, MAGMA, CULA... @@ -1027,7 +1027,9 @@ end do - Use OpenACC for memory management - Introduce OpenACC in existing GPU code - Use CUDA for tightest kernels, otherwise OpenACC - ``` + +```Fortran + allocate(x(n), y(n)) istat = curandCreateGenerator(g, CURAND_RNG_PSEUDO_DEFAULT) ! initialize the rng @@ -1036,8 +1038,9 @@ istat = curandCreateGenerator(g, CURAND_RNG_PSEUDO_DEFAULT) ! initialize the rn istat = curandGenerateUniform(g, x, n) istat = curandGenerateUniform(g, y, n) !$acc end host_data -``` - + +``` + # OpenACC - OpenMP