[cig-commits] [commit] devel, master: finish removing unused textures from kernels calls (ad8193f)
cig_noreply at geodynamics.org
cig_noreply at geodynamics.org
Thu Nov 6 08:32:58 PST 2014
Repository : https://github.com/geodynamics/specfem3d_globe
On branches: devel,master
Link : https://github.com/geodynamics/specfem3d_globe/compare/bc58e579b3b0838a0968725a076f5904845437ca...be63f20cbb6f462104e949894dbe205d2398cd7f
>---------------------------------------------------------------
commit ad8193f6c21b902351a27d3d0d7a76505af8ca98
Author: Kevin Pouget <kevin.pouget at imag.fr>
Date: Thu Oct 23 15:38:19 2014 +0200
finish removing unused textures from kernels calls
>---------------------------------------------------------------
ad8193f6c21b902351a27d3d0d7a76505af8ca98
src/gpu/prepare_mesh_constants_gpu.c | 14 ++++----------
1 file changed, 4 insertions(+), 10 deletions(-)
diff --git a/src/gpu/prepare_mesh_constants_gpu.c b/src/gpu/prepare_mesh_constants_gpu.c
index 2dd64a7..c6adf4a 100644
--- a/src/gpu/prepare_mesh_constants_gpu.c
+++ b/src/gpu/prepare_mesh_constants_gpu.c
@@ -35,8 +35,8 @@
/* ----------------------------------------------------------------------------------------------- */
#ifdef USE_OPENCL
-
-cl_mem moclGetDummyImage2D (Mesh *mp) {
+#ifdef USE_TEXTURES_FIELDS
+static cl_mem moclGetDummyImage2D (Mesh *mp) {
static int inited = 0;
static cl_mem image2d;
cl_int errcode;
@@ -51,7 +51,7 @@ cl_mem moclGetDummyImage2D (Mesh *mp) {
return image2d;
}
-
+#endif
/* ----------------------------------------------------------------------------------------------- */
void release_kernels (void) {
@@ -1942,12 +1942,6 @@ void FC_FUNC_ (prepare_outer_core_device,
mp->d_b_displ_oc_tex = moclGetDummyImage2D(mp);
mp->d_b_accel_oc_tex = moclGetDummyImage2D(mp);
}
-#else
- mp->d_displ_oc_tex = moclGetDummyImage2D(mp);
- mp->d_accel_oc_tex = moclGetDummyImage2D(mp);
- // backward/reconstructed fields
- mp->d_b_displ_oc_tex = moclGetDummyImage2D(mp);
- mp->d_b_accel_oc_tex = moclGetDummyImage2D(mp);
#endif
}
#endif
@@ -2454,7 +2448,7 @@ void FC_FUNC_ (prepare_cleanup_device,
if (mp->nrec_local > 0) {
if (GPU_ASYNC_COPY) {
#ifdef USE_OPENCL
- if (run_opencl ) RELEASE_PINNED_BUFFER_OCL (station_seismo_field);
+ if (run_opencl) RELEASE_PINNED_BUFFER_OCL (station_seismo_field);
#endif
#ifdef USE_CUDA
if (run_cuda) cudaFreeHost(mp->h_station_seismo_field);
More information about the CIG-COMMITS
mailing list