Project
Loading...
Searching...
No Matches
GPUTPCSectorOutput.h
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11
14
15#ifndef GPUTPCSECTOROUTPUT_H
16#define GPUTPCSECTOROUTPUT_H
17
18#include "GPUTPCDef.h"
19#include "GPUTPCTrack.h"
20
21namespace o2::gpu
22{
23struct GPUOutputControl;
24
37{
38 public:
39 GPUhd() uint32_t NTracks() const
40 {
41 return mNTracks;
42 }
43 GPUhd() uint32_t NLocalTracks() const { return mNLocalTracks; }
44 GPUhd() uint32_t NTrackClusters() const { return mNTrackClusters; }
45 GPUhd() const GPUTPCTrack* GetFirstTrack() const
46 {
47 return (const GPUTPCTrack*)((const char*)this + sizeof(*this));
48 }
49 GPUhd() GPUTPCTrack* FirstTrack()
50 {
51 return (GPUTPCTrack*)((char*)this + sizeof(*this));
52 }
53 GPUhd() size_t Size() const
54 {
55 return (mMemorySize);
56 }
57
58 static uint32_t EstimateSize(uint32_t nOfTracks, uint32_t nOfTrackClusters);
59 static void Allocate(GPUTPCSectorOutput*& ptrOutput, int32_t nTracks, int32_t nTrackHits, GPUOutputControl* outputControl, void*& internalMemory);
60
61 GPUhd() void SetNTracks(uint32_t v) { mNTracks = v; }
62 GPUhd() void SetNLocalTracks(uint32_t v) { mNLocalTracks = v; }
63 GPUhd() void SetNTrackClusters(uint32_t v) { mNTrackClusters = v; }
64
65 private:
66 GPUTPCSectorOutput() = delete; // NOLINT: Must be private or ROOT tries to use them!
67 ~GPUTPCSectorOutput() = delete; // NOLINT
68 GPUTPCSectorOutput(const GPUTPCSectorOutput&) = delete; // NOLINT
69 GPUTPCSectorOutput& operator=(const GPUTPCSectorOutput&) = delete; // NOLINT
70
71 GPUhd() void SetMemorySize(size_t val) { mMemorySize = val; }
72
73 uint32_t mNTracks; // number of reconstructed tracks
74 uint32_t mNLocalTracks;
75 uint32_t mNTrackClusters; // total number of track clusters
76 size_t mMemorySize; // Amount of memory really used
77};
78} // namespace o2::gpu
79#endif
GPUhd() uint32_t NTrackClusters() const
GPUhd() const GPUTPCTrack *GetFirstTrack() const
static uint32_t EstimateSize(uint32_t nOfTracks, uint32_t nOfTrackClusters)
GPUhd() GPUTPCTrack *FirstTrack()
GPUhd() uint32_t NTracks() const
GPUhd() size_t Size() const
GPUhd() void SetNTrackClusters(uint32_t v)
GPUhd() void SetNLocalTracks(uint32_t v)
GPUhd() uint32_t NLocalTracks() const
GPUhd() void SetNTracks(uint32_t v)
static void Allocate(GPUTPCSectorOutput *&ptrOutput, int32_t nTracks, int32_t nTrackHits, GPUOutputControl *outputControl, void *&internalMemory)
const GLdouble * v
Definition glcorearb.h:832
typedef void(APIENTRYP PFNGLCULLFACEPROC)(GLenum mode)
GLuint GLfloat * val
Definition glcorearb.h:1582