1+ /*
2+ !=====================================================================
3+ !
4+ ! S p e c f e m 3 D
5+ ! -----------------
6+ !
7+ ! Main historical authors: Dimitri Komatitsch and Jeroen Tromp
8+ ! CNRS, France
9+ ! and Princeton University, USA
10+ ! (there are currently many more authors!)
11+ ! (c) October 2017
12+ !
13+ ! This program is free software; you can redistribute it and/or modify
14+ ! it under the terms of the GNU General Public License as published by
15+ ! the Free Software Foundation; either version 3 of the License, or
16+ ! (at your option) any later version.
17+ !
18+ ! This program is distributed in the hope that it will be useful,
19+ ! but WITHOUT ANY WARRANTY; without even the implied warranty of
20+ ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21+ ! GNU General Public License for more details.
22+ !
23+ ! You should have received a copy of the GNU General Public License along
24+ ! with this program; if not, write to the Free Software Foundation, Inc.,
25+ ! 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
26+ !
27+ !=====================================================================
28+ */
29+
130#include " mesh_constants_gpu.h"
231
332extern EXTERN_LANG
433void FC_FUNC_ (wavefield_discontinuity_add_traction_cuda,
5- WAVEFIELD_DISCONTINUITY_ADD_TRACTION_CUDA)(int * size_points,
34+ WAVEFIELD_DISCONTINUITY_ADD_TRACTION_CUDA)(int * size_points,
635 int * size_faces,
736 long * Mesh_pointer){
837 TRACE (" wavefield_discontinuity_add_traction_cuda" );
@@ -17,7 +46,7 @@ void FC_FUNC_(wavefield_discontinuity_add_traction_cuda,
1746
1847 dim3 grid (num_blocks_x,num_blocks_y);
1948 dim3 threads (blocksize,1 ,1 );
20-
49+
2150#ifdef USE_CUDA
2251 if (run_cuda) {
2352 add_acceleration_discontinuity_kernel
@@ -29,17 +58,17 @@ void FC_FUNC_(wavefield_discontinuity_add_traction_cuda,
2958#endif
3059#ifdef USE_HIP
3160 if (run_hip) {
32- hipLaunchKernelGGL (add_acceleration_discontinuity_kernel,
61+ hipLaunchKernelGGL (add_acceleration_discontinuity_kernel,
3362 dim3 (grid), dim3 (threads), 0 , mp->compute_stream , mp->d_accel_wd ,
3463 mp->d_mass_in_wd ,
35- mp->d_boundary_to_iglob_wd ,
64+ mp->d_boundary_to_iglob_wd ,
3665 size, mp->d_accel );
3766 }
3867#endif
39-
68+
4069 size = (*size_faces);
4170 blocksize = NGLL2;
42-
71+
4372 get_blocks_xy (size,&num_blocks_x,&num_blocks_y);
4473
4574 dim3 grid2 (num_blocks_x,num_blocks_y);
0 commit comments