-
Notifications
You must be signed in to change notification settings - Fork 13
Conversation
SDL/Event.cu
Outdated
@@ -5,6 +5,7 @@ struct SDL::modules* SDL::modulesInGPU = nullptr; | |||
struct SDL::pixelMap* SDL::pixelMapping = nullptr; | |||
uint16_t SDL::nModules; | |||
uint16_t SDL::nLowerModules; | |||
unsigned int nTotalSegments; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can now see that you don't duplicate the creation of segment arrays, taking into account my comment (thank you, I will resolve that discussion). Because of this, I understand that you had to define the nTotalSegments
in a more global scope, so that you can use it in multiple functions within the Event
class.
However, you define it as a global variable and this can change from event to event. If we run multi-streaming, I would expect it to be changed by all of the events that run concurrently, leading to unexpected behavior, since all of them will have different values for that same variable. To save ourselves from this situation, I would make the nTotalSegments
variable a private variable of the Event
class (like this one), so that each event can have its own value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for pointing it out Manos! I've put this into Event class to correct this :)
SDL/Event.cu
Outdated
createSegmentArrayRanges(*modulesInGPU, *rangesInGPU, *mdsInGPU, nLowerModules, nTotalSegments, stream, N_MAX_SEGMENTS_PER_MODULE, N_MAX_PIXEL_SEGMENTS_PER_MODULE); | ||
// cout<<"nTotalSegments: "<<nTotalSegments<<std::endl; // for memory usage | ||
|
||
//problem here: didn't distinguish pixel segments and outtracker segments. so they use the same memory index, which should be different and allocate dynamically |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, check the discussion on the same line from the previous PR.
Looks good. I'm merging this |
this is a clean up PR following #222 , removing redundant mess up of duplicate commits. Double check with nvprof and cuda-memcheck, see no errors.