Skip to content

Commit

Permalink
Define CUDA-specific attributes for compatiility with GCC (#559)
Browse files Browse the repository at this point in the history
Including <cuda_runtime.h> would pull in the dependency on all of CUDA;
instead, just define away the CUDA specific attributes to keep GCC happy.
  • Loading branch information
fwyzard committed Oct 20, 2020
1 parent dcc83ba commit bb1d39d
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions CondFormats/SiPixelObjects/interface/SiPixelGainForHLTonGPU.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,17 @@
#include <cstdio>
#include <tuple>

// including <cuda_runtime.h> would pull in the dependency on all of CUDA;
// instead, just define away the CUDA specific attributes to keep GCC happy.
#ifndef __CUDACC__
#ifndef __host__
#define __host__
#endif // __host__
#ifndef __device__
#define __device__
#endif // __device__
#endif // __CUDACC__

#include "HeterogeneousCore/CUDAUtilities/interface/cuda_assert.h"

struct SiPixelGainForHLTonGPU_DecodingStructure {
Expand Down

0 comments on commit bb1d39d

Please sign in to comment.