Skip to content
This repository was archived by the owner on Dec 9, 2024. It is now read-only.

Commit 069c78b

Browse files
committed
additional cleanup
1 parent 6f60aa4 commit 069c78b

File tree

5 files changed

+0
-121
lines changed

5 files changed

+0
-121
lines changed

SDL/Event.cuh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ namespace SDL
8181
void addPixelSegmentToEvent(std::vector<unsigned int> hitIndices0,std::vector<unsigned int> hitIndices1,std::vector<unsigned int> hitIndices2,std::vector<unsigned int> hitIndices3, std::vector<float> dPhiChange, std::vector<float> ptIn, std::vector<float> ptErr, std::vector<float> px, std::vector<float> py, std::vector<float> pz, std::vector<float> eta, std::vector<float> etaErr, std::vector<float> phi, std::vector<int> charge, std::vector<unsigned int> seedIdx, std::vector<int> superbin, std::vector<int8_t> pixelType, std::vector<short> isQuad);
8282

8383
/*functions that map the objects to the appropriate modules*/
84-
void addMiniDoubletsToEvent();
8584
void addMiniDoubletsToEventExplicit();
8685
void addSegmentsToEventExplicit();
8786
void addTripletsToEventExplicit();

SDL/MiniDoublet.cu

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -952,33 +952,6 @@ if(success)
952952
}
953953
__global__ void SDL::addMiniDoubletRangesToEventExplicit(struct modules& modulesInGPU, struct miniDoublets& mdsInGPU, struct objectRanges& rangesInGPU,struct hits& hitsInGPU)
954954
{
955-
//uint16_t nLowerModules;
956-
//cudaMemcpyAsync(&nLowerModules,modulesInGPU->nLowerModules,sizeof(uint16_t),cudaMemcpyDeviceToHost,stream);
957-
//unsigned int* nMDsCPU;
958-
//nMDsCPU = (unsigned int*)cms::cuda::allocate_host(nLowerModules * sizeof(unsigned int), stream);
959-
//cudaMemcpyAsync(nMDsCPU,mdsInGPU->nMDs,nLowerModules*sizeof(unsigned int),cudaMemcpyDeviceToHost,stream);
960-
//cudaStreamSynchronize(stream);
961-
962-
//short* module_subdets;
963-
//module_subdets = (short*)cms::cuda::allocate_host(nLowerModules* sizeof(short), stream);
964-
//cudaMemcpyAsync(module_subdets,modulesInGPU->subdets,nLowerModules*sizeof(short),cudaMemcpyDeviceToHost,stream);
965-
//int* module_mdRanges;
966-
//module_mdRanges = (int*)cms::cuda::allocate_host(nLowerModules* 2*sizeof(int), stream);
967-
//cudaMemcpyAsync(module_mdRanges,rangesInGPU->mdRanges,nLowerModules*2*sizeof(int),cudaMemcpyDeviceToHost,stream);
968-
//short* module_layers;
969-
//module_layers = (short*)cms::cuda::allocate_host(nLowerModules * sizeof(short), stream);
970-
//cudaMemcpyAsync(module_layers,modulesInGPU->layers,nLowerModules*sizeof(short),cudaMemcpyDeviceToHost,stream);
971-
//int* module_hitRanges;
972-
//module_hitRanges = (int*)cms::cuda::allocate_host(nLowerModules* 2*sizeof(int), stream);
973-
//cudaMemcpyAsync(module_hitRanges,hitsInGPU->hitRanges,nLowerModules*2*sizeof(int),cudaMemcpyDeviceToHost,stream);
974-
975-
//int* module_miniDoubletModuleIndices;
976-
//module_miniDoubletModuleIndices = (int*)cms::cuda::allocate_host(nLowerModules * sizeof(int), stream);
977-
//cudaMemcpyAsync(module_miniDoubletModuleIndices, rangesInGPU->miniDoubletModuleIndices, nLowerModules * sizeof(int), cudaMemcpyDeviceToHost, stream);
978-
//cudaStreamSynchronize(stream);
979-
980-
//for(unsigned int i = 0; i<nLowerModules; i++)
981-
//{
982955
int gid = blockIdx.x * blockDim.x + threadIdx.x;
983956
int np = gridDim.x * blockDim.x;
984957
for(uint16_t i = gid; i < *modulesInGPU.nLowerModules; i+= np)
@@ -992,16 +965,6 @@ __global__ void SDL::addMiniDoubletRangesToEventExplicit(struct modules& modules
992965
{
993966
rangesInGPU.mdRanges[i * 2] = rangesInGPU.miniDoubletModuleIndices[i] ;
994967
rangesInGPU.mdRanges[i * 2 + 1] = rangesInGPU.miniDoubletModuleIndices[i] + mdsInGPU.nMDs[i] - 1;
995-
996-
//if(module_subdets[i] == Barrel)
997-
//{
998-
// n_minidoublets_by_layer_barrel_[module_layers[i] -1] += nMDsCPU[i];
999-
//}
1000-
//else
1001-
//{
1002-
// n_minidoublets_by_layer_endcap_[module_layers[i] - 1] += nMDsCPU[i];
1003-
//}
1004-
1005968
}
1006969
}
1007970
}

SDL/Quintuplet.cu

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -2070,30 +2070,6 @@ __device__ void SDL::runDeltaBetaIterationsT5(float& betaIn, float& betaOut, flo
20702070
}
20712071
__global__ void SDL::addQuintupletRangesToEventExplicit(struct modules& modulesInGPU, struct quintuplets& quintupletsInGPU, struct objectRanges& rangesInGPU)
20722072
{
2073-
// uint16_t nLowerModules;
2074-
// cudaMemcpyAsync(&nLowerModules,modulesInGPU->nLowerModules,sizeof(uint16_t),cudaMemcpyDeviceToHost,stream);
2075-
// cudaStreamSynchronize(stream);
2076-
//
2077-
// unsigned int* nQuintupletsCPU;
2078-
// nQuintupletsCPU = (unsigned int*)cms::cuda::allocate_host(nLowerModules * sizeof(unsigned int), stream);
2079-
//
2080-
// cudaMemcpyAsync(nQuintupletsCPU,quintupletsInGPU->nQuintuplets,nLowerModules*sizeof(unsigned int),cudaMemcpyDeviceToHost,stream);
2081-
//
2082-
// short* module_subdets;
2083-
// module_subdets = (short*)cms::cuda::allocate_host(nModules* sizeof(short), stream);
2084-
// cudaMemcpyAsync(module_subdets,modulesInGPU->subdets,nModules*sizeof(short),cudaMemcpyDeviceToHost,stream);
2085-
// int* module_quintupletRanges;
2086-
// module_quintupletRanges = (int*)cms::cuda::allocate_host(nLowerModules* 2*sizeof(int), stream);
2087-
// cudaMemcpyAsync(module_quintupletRanges,rangesInGPU->quintupletRanges,nLowerModules*2*sizeof(int),cudaMemcpyDeviceToHost,stream);
2088-
// short* module_layers;
2089-
// module_layers = (short*)cms::cuda::allocate_host(nLowerModules * sizeof(short), stream);
2090-
// cudaMemcpyAsync(module_layers,modulesInGPU->layers,nLowerModules*sizeof(short),cudaMemcpyDeviceToHost,stream);
2091-
// int* module_quintupletModuleIndices;
2092-
// module_quintupletModuleIndices = (int*)cms::cuda::allocate_host(nLowerModules * sizeof(int), stream);
2093-
// cudaMemcpyAsync(module_quintupletModuleIndices, rangesInGPU->quintupletModuleIndices, nLowerModules * sizeof(int), cudaMemcpyDeviceToHost,stream);
2094-
//cudaStreamSynchronize(stream);
2095-
// for(uint16_t i = 0; i<nLowerModules; i++)
2096-
// {
20972073
int gid = blockIdx.x * blockDim.x + threadIdx.x;
20982074
int np = gridDim.x * blockDim.x;
20992075
for(uint16_t i = gid; i < *modulesInGPU.nLowerModules; i+= np)
@@ -2107,19 +2083,6 @@ __global__ void SDL::addQuintupletRangesToEventExplicit(struct modules& modulesI
21072083
{
21082084
rangesInGPU.quintupletRanges[i * 2] = rangesInGPU.quintupletModuleIndices[i];
21092085
rangesInGPU.quintupletRanges[i * 2 + 1] = rangesInGPU.quintupletModuleIndices[i] + quintupletsInGPU.nQuintuplets[i] - 1;
2110-
2111-
// if(module_subdets[i] == Barrel)
2112-
// {
2113-
// n_quintuplets_by_layer_barrel_[module_layers[i] - 1] += nQuintupletsCPU[i];
2114-
// }
2115-
// else
2116-
// {
2117-
// n_quintuplets_by_layer_endcap_[module_layers[i] - 1] += nQuintupletsCPU[i];
2118-
// }
21192086
}
21202087
}
2121-
//cms::cuda::free_host(nQuintupletsCPU);
2122-
//cms::cuda::free_host(module_quintupletRanges);
2123-
//cms::cuda::free_host(module_layers);
2124-
//cms::cuda::free_host(module_subdets);
21252088
}

SDL/Segment.cu

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -884,15 +884,6 @@ __global__ void SDL::addSegmentRangesToEventExplicit(struct modules& modulesInGP
884884
{
885885
rangesInGPU.segmentRanges[i * 2] = rangesInGPU.segmentModuleIndices[i];
886886
rangesInGPU.segmentRanges[i * 2 + 1] = rangesInGPU.segmentModuleIndices[i] + segmentsInGPU.nSegments[i] - 1;
887-
888-
//if(module_subdets[i] == Barrel)
889-
//{
890-
// n_segments_by_layer_barrel_[module_layers[i] - 1] += nSegmentsCPU[i];
891-
//}
892-
//else
893-
//{
894-
// n_segments_by_layer_endcap_[module_layers[i] -1] += nSegmentsCPU[i];
895-
//}
896887
}
897888
}
898889
}

SDL/Triplet.cu

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1444,31 +1444,6 @@ __device__ void SDL::runDeltaBetaIterationsT3(float& betaIn, float& betaOut, flo
14441444
}
14451445
__global__ void SDL::addTripletRangesToEventExplicit(struct modules& modulesInGPU, struct triplets& tripletsInGPU, struct objectRanges& rangesInGPU)
14461446
{
1447-
// uint16_t nLowerModules;
1448-
// cudaMemcpyAsync(&nLowerModules,modulesInGPU->nLowerModules,sizeof(uint16_t),cudaMemcpyDeviceToHost,stream);
1449-
// cudaStreamSynchronize(stream);
1450-
//
1451-
// unsigned int* nTripletsCPU;
1452-
// nTripletsCPU = (unsigned int*)cms::cuda::allocate_host(nLowerModules * sizeof(unsigned int), stream);
1453-
// cudaMemcpyAsync(nTripletsCPU,tripletsInGPU->nTriplets,nLowerModules*sizeof(unsigned int),cudaMemcpyDeviceToHost,stream);
1454-
//
1455-
// short* module_subdets;
1456-
// module_subdets = (short*)cms::cuda::allocate_host(nLowerModules* sizeof(short), stream);
1457-
// cudaMemcpyAsync(module_subdets,modulesInGPU->subdets,nLowerModules*sizeof(short),cudaMemcpyDeviceToHost,stream);
1458-
// int* module_tripletRanges;
1459-
// module_tripletRanges = (int*)cms::cuda::allocate_host(nLowerModules* 2*sizeof(int), stream);
1460-
// cudaMemcpyAsync(module_tripletRanges,rangesInGPU->tripletRanges,nLowerModules*2*sizeof(int),cudaMemcpyDeviceToHost,stream);
1461-
// short* module_layers;
1462-
// module_layers = (short*)cms::cuda::allocate_host(nLowerModules * sizeof(short), stream);
1463-
// cudaMemcpyAsync(module_layers,modulesInGPU->layers,nLowerModules*sizeof(short),cudaMemcpyDeviceToHost,stream);
1464-
//
1465-
// int* module_tripletModuleIndices;
1466-
// module_tripletModuleIndices = (int*)cms::cuda::allocate_host(nLowerModules * sizeof(int), stream);
1467-
// cudaMemcpyAsync(module_tripletModuleIndices, rangesInGPU->tripletModuleIndices, nLowerModules * sizeof(int), cudaMemcpyDeviceToHost, stream);
1468-
//
1469-
// cudaStreamSynchronize(stream);
1470-
// for(uint16_t i = 0; i<nLowerModules; i++)
1471-
// V {
14721447
int gid = blockIdx.x * blockDim.x + threadIdx.x;
14731448
int np = gridDim.x * blockDim.x;
14741449
for(uint16_t i = gid; i < *modulesInGPU.nLowerModules; i+= np)
@@ -1482,18 +1457,6 @@ __global__ void SDL::addTripletRangesToEventExplicit(struct modules& modulesInGP
14821457
{
14831458
rangesInGPU.tripletRanges[i * 2] = rangesInGPU.tripletModuleIndices[i];
14841459
rangesInGPU.tripletRanges[i * 2 + 1] = rangesInGPU.tripletModuleIndices[i] + tripletsInGPU.nTriplets[i] - 1;
1485-
1486-
//if(module_subdets[i] == Barrel)
1487-
//{
1488-
// n_triplets_by_layer_barrel_[module_layers[i] - 1] += nTripletsCPU[i];
1489-
//}
1490-
//else
1491-
//{
1492-
// n_triplets_by_layer_endcap_[module_layers[i] - 1] += nTripletsCPU[i];
1493-
//}
14941460
}
14951461
}
1496-
1497-
//cudaMemcpyAsync(rangesInGPU->tripletRanges, module_tripletRanges, nLowerModules * 2 * sizeof(int), cudaMemcpyDeviceToHost, stream);
1498-
//cudaStreamSynchronize(stream);
14991462
}

0 commit comments

Comments
 (0)