summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIllya Shapoval <illya.shapoval@cern.ch>2015-04-29 12:15:21 +0200
committerIllya Shapoval <illya.shapoval@cern.ch>2015-04-29 12:15:21 +0200
commitd7ff0360e88e2b15d4a217f87ba74212e6fca13a (patch)
treeac5289798b3d6b09ff4a9e33b68d8a1d30549c23
parentacded46a6ddca67d53fe8d1de1f36f6c62a7d6c2 (diff)
bugfix: DO-handles allocated in the wrong placedev/accel
-rw-r--r--GaudiGPU/src/GPUVecSortThrustAlg.cu34
1 files changed, 17 insertions, 17 deletions
diff --git a/GaudiGPU/src/GPUVecSortThrustAlg.cu b/GaudiGPU/src/GPUVecSortThrustAlg.cu
index 80d7624..5cf3008 100644
--- a/GaudiGPU/src/GPUVecSortThrustAlg.cu
+++ b/GaudiGPU/src/GPUVecSortThrustAlg.cu
@@ -22,10 +22,23 @@ DECLARE_ALGORITHM_FACTORY(GPUVecSortThrustAlg)
GPUVecSortThrustAlg::GPUVecSortThrustAlg(const std::string& name, ISvcLocator* pSvcLocator)
: GaudiAlgorithm(name, pSvcLocator), m_vect_dim(1)
{
- declareProperty("VectorDimension", m_vect_dim,
- "Dimension of vector, used for calculation");
- declareProperty("Profile", m_profile=false,
+ declareProperty("VectorDimension", m_vect_dim,
+ "Dimension of vector, used for calculation");
+ declareProperty("Profile", m_profile = false,
"Turn on profiling of the algorithm (dumped to file), in nanoseconds");
+
+ // For Concurrent run
+ m_inputHandles.resize(MAX_INPUTS);
+ for (uint i = 0; i < MAX_INPUTS; ++i){
+ m_inputHandles[i] = new DataObjectHandle<DataObject>();
+ declareInput("input_" + std::to_string(i), *m_inputHandles[i]);
+ }
+
+ m_outputHandles.resize(MAX_OUTPUTS);
+ for (uint i = 0; i < MAX_OUTPUTS; ++i){
+ m_outputHandles[i] = new DataObjectHandle<DataObject>();
+ declareOutput("output_" + std::to_string(i), *m_outputHandles[i]);
+ }
}
// ============================================================================
@@ -37,7 +50,7 @@ GPUVecSortThrustAlg::~GPUVecSortThrustAlg() {
delete m_inputHandles[i];
for (uint i = 0; i < MAX_OUTPUTS; ++i)
- delete m_outputHandles[i];
+ delete m_outputHandles[i];
}
@@ -51,19 +64,6 @@ StatusCode GPUVecSortThrustAlg::initialize() {
if ( msgLevel(MSG::DEBUG) ) debug() << "==> Initialize " << endmsg;
- // For Concurrent run
- m_inputHandles.resize(MAX_INPUTS);
- for (uint i = 0; i < MAX_INPUTS; ++i){
- m_inputHandles[i] = new DataObjectHandle<DataObject>();
- declareInput("input_" + std::to_string(i), *m_inputHandles[i]);
- }
-
- m_outputHandles.resize(MAX_OUTPUTS);
- for (uint i = 0; i < MAX_OUTPUTS; ++i){
- m_outputHandles[i] = new DataObjectHandle<DataObject>();
- declareOutput("output_" + std::to_string(i), *m_outputHandles[i]);
- }
-
return StatusCode::SUCCESS;
}