Skip to content

Commit

Permalink
Rename gpuClusterThresholds to GPUClusterThresholds
Browse files Browse the repository at this point in the history
  • Loading branch information
czangela committed Mar 24, 2021
1 parent 17443cf commit f8e485c
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 20 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#ifndef RecoLocalTracker_SiPixelClusterizer_interface_GPUClusterThresholds_h
#define RecoLocalTracker_SiPixelClusterizer_interface_GPUClusterThresholds_h

struct GPUClusterThresholds {
constexpr GPUClusterThresholds(int32_t clusterThreshold_L1, int32_t clusterThreshold)
: layer1(clusterThreshold_L1), otherLayers(clusterThreshold){};
const int32_t layer1; // Cluster threshold in electrons for Layer 1
const int32_t otherLayers; // Cluster threshold in electrons
};

#endif // RecoLocalTracker_SiPixelClusterizer_interface_GPUClusterThresholds_h

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#include "HeterogeneousCore/CUDACore/interface/ScopedContext.h"
#include "HeterogeneousCore/CUDAServices/interface/CUDAService.h"
#include "RecoTracker/Record/interface/CkfComponentsRecord.h"
#include "RecoLocalTracker/SiPixelClusterizer/interface/gpuClusterThresholds.h"
#include "RecoLocalTracker/SiPixelClusterizer/interface/GPUClusterThresholds.h"

// local includes
#include "SiPixelRawToClusterGPUKernel.h"
Expand Down Expand Up @@ -78,7 +78,7 @@ class SiPixelRawToClusterCUDA : public edm::stream::EDProducer<edm::ExternalWork
const bool isRun2_;
const bool includeErrors_;
const bool useQuality_;
const gpuClusterThresholds clusterThresholds_;
const GPUClusterThresholds clusterThresholds_;
};

SiPixelRawToClusterCUDA::SiPixelRawToClusterCUDA(const edm::ParameterSet& iConfig)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@ namespace pixelgpudetails {

// Interface to outside
void SiPixelRawToClusterGPUKernel::makeClustersAsync(bool isRun2,
const gpuClusterThresholds clusterThresholds,
const GPUClusterThresholds clusterThresholds,
const SiPixelROCsStatusAndMapping *cablingMap,
const unsigned char *modToUnp,
const SiPixelGainForHLTonGPU *gains,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include "HeterogeneousCore/CUDAUtilities/interface/host_noncached_unique_ptr.h"
#include "DataFormats/SiPixelRawData/interface/SiPixelErrorCompact.h"
#include "DataFormats/SiPixelRawData/interface/SiPixelFormatterErrors.h"
#include "RecoLocalTracker/SiPixelClusterizer/interface/gpuClusterThresholds.h"
#include "RecoLocalTracker/SiPixelClusterizer/interface/GPUClusterThresholds.h"

struct SiPixelROCsStatusAndMapping;
class SiPixelGainForHLTonGPU;
Expand Down Expand Up @@ -171,7 +171,7 @@ namespace pixelgpudetails {
SiPixelRawToClusterGPUKernel& operator=(SiPixelRawToClusterGPUKernel&&) = delete;

void makeClustersAsync(bool isRun2,
const gpuClusterThresholds clusterThresholds,
const GPUClusterThresholds clusterThresholds,
const SiPixelROCsStatusAndMapping* cablingMap,
const unsigned char* modToUnp,
const SiPixelGainForHLTonGPU* gains,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
#include "CUDADataFormats/SiPixelCluster/interface/gpuClusteringConstants.h"
#include "HeterogeneousCore/CUDAUtilities/interface/cuda_assert.h"
#include "HeterogeneousCore/CUDAUtilities/interface/prefixScan.h"
#include "RecoLocalTracker/SiPixelClusterizer/interface/gpuClusterThresholds.h"
#include "RecoLocalTracker/SiPixelClusterizer/interface/GPUClusterThresholds.h"

namespace gpuClustering {

__global__ void clusterChargeCut(
gpuClusterThresholds clusterThresholds, // charge cut on cluster in electrons (for layer 1 and for other layers)
GPUClusterThresholds clusterThresholds, // charge cut on cluster in electrons (for layer 1 and for other layers)
uint16_t* __restrict__ id, // module id of each pixel (modified if bad cluster)
uint16_t const* __restrict__ adc, // charge of each pixel
uint32_t const* __restrict__ moduleStart, // index of the first pixel of each module
Expand Down
4 changes: 2 additions & 2 deletions RecoLocalTracker/SiPixelClusterizer/test/gpuClustering_t.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

#include "RecoLocalTracker/SiPixelClusterizer/plugins/gpuClustering.h"
#include "RecoLocalTracker/SiPixelClusterizer/plugins/gpuClusterChargeCut.h"
#include "RecoLocalTracker/SiPixelClusterizer/interface/gpuClusterThresholds.h"
#include "RecoLocalTracker/SiPixelClusterizer/interface/GPUClusterThresholds.h"

int main(void) {
#ifdef __CUDACC__
Expand All @@ -28,7 +28,7 @@ int main(void) {
using namespace gpuClustering;

constexpr int numElements = 256 * maxNumModules;
constexpr gpuClusterThresholds clusterThresholds(2000, 4000);
constexpr GPUClusterThresholds clusterThresholds(2000, 4000);

// these in reality are already on GPU
auto h_id = std::make_unique<uint16_t[]>(numElements);
Expand Down

0 comments on commit f8e485c

Please sign in to comment.