Skip to content

Commit 683588a

Browse files
committed
GPU: Some fixes for char / unsigned char handling
1 parent 07364d7 commit 683588a

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

GPU/GPUTracking/DataCompression/GPUTPCCompressionKernels.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ GPUdii() void GPUTPCCompressionKernels::Thread<GPUTPCCompressionKernels::step0at
3333
GPUTPCCompression& GPUrestrict() compressor = processors.tpcCompressor;
3434
const GPUParam& GPUrestrict() param = processors.param;
3535

36-
char lastLeg = 0;
36+
unsigned char lastLeg = 0;
3737
int myTrack = 0;
3838
for (unsigned int i = get_global_id(0); i < ioPtrs.nMergedTracks; i += get_global_size(0)) {
3939
GPUbarrierWarp();

GPU/GPUTracking/Definitions/GPUSettingsList.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ AddOptionRTC(cfInnerThreshold, unsigned char, 0, "", 0, "Cluster Finder extends
128128
AddOptionRTC(cfMinSplitNum, unsigned char, 1, "", 0, "Minimum number of split charges in a cluster for the cluster to be marked as split")
129129
AddOptionRTC(cfNoiseSuppressionEpsilon, unsigned char, 10, "", 0, "Cluster Finder: Difference between peak and charge for the charge to count as a minima during noise suppression")
130130
AddOptionRTC(cfNoiseSuppressionEpsilonRelative, unsigned char, 76, "", 0, "Cluster Finder: Difference between peak and charge for the charge to count as a minima during noise suppression, relative as fraction of 255")
131-
AddOptionRTC(nWays, signed char, 3, "", 0, "Do N fit passes in final fit of merger")
131+
AddOptionRTC(nWays, unsigned char, 3, "", 0, "Do N fit passes in final fit of merger")
132132
AddOptionRTC(nWaysOuter, signed char, 0, "", 0, "Store outer param")
133133
AddOptionRTC(trackFitRejectMode, signed char, 5, "", 0, "0: no limit on rejection or missed hits, >0: break after n rejected hits, <0: reject at max -n hits")
134134
AddOptionRTC(dEdxTruncLow, unsigned char, 2, "", 0, "Low truncation threshold, fraction of 128")

GPU/GPUTracking/Merger/GPUTPCGMMerger.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2089,7 +2089,7 @@ GPUd() void GPUTPCGMMerger::Finalize1(int nBlocks, int nThreads, int iBlock, int
20892089
if (!trk.OK() || trk.NClusters() == 0) {
20902090
continue;
20912091
}
2092-
char goodLeg = mClusters[trk.FirstClusterRef() + trk.NClusters() - 1].leg;
2092+
unsigned char goodLeg = mClusters[trk.FirstClusterRef() + trk.NClusters() - 1].leg;
20932093
for (unsigned int j = 0; j < trk.NClusters(); j++) {
20942094
int id = mClusters[trk.FirstClusterRef() + j].num;
20952095
unsigned int weight = mTrackOrderAttach[i] | attachAttached;

GPU/GPUTracking/display/GPUDisplayFrontendGlfw.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ void GPUDisplayFrontendGlfw::GetKey(int key, int scancode, int mods, int& keyOut
167167
if (specialKey) {
168168
keyOut = keyPressOut = specialKey;
169169
} else {
170-
keyOut = keyPressOut = localeKey;
170+
keyOut = keyPressOut = (unsigned char)localeKey;
171171
if (keyPressOut >= 'a' && keyPressOut <= 'z') {
172172
keyPressOut += 'A' - 'a';
173173
}
@@ -193,7 +193,7 @@ void GPUDisplayFrontendGlfw::key_callback(GLFWwindow* window, int key, int scanc
193193
if (action == GLFW_PRESS) {
194194
me->mLastKeyDown = handleKey;
195195
} else if (action == GLFW_RELEASE) {
196-
keyPress = me->mKeyDownMap[handleKey];
196+
keyPress = (unsigned char)me->mKeyDownMap[handleKey];
197197
me->mKeys[keyPress] = false;
198198
me->mKeysShift[keyPress] = false;
199199
}

GPU/GPUTracking/display/GPUDisplayFrontendX11.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ void GPUDisplayFrontendX11::GetKey(XEvent& event, int& keyOut, int& keyPressOut)
147147
tmpString[0] = 0;
148148
}
149149
int specialKey = GetKey(sym);
150-
int localeKey = tmpString[0];
150+
int localeKey = (unsigned char)tmpString[0];
151151
// GPUInfo("Key: keycode %d -> sym %d (%c) key %d (%c) special %d (%c)", (int)event.xkey.keycode, (int)sym, (char)sym, (int)localeKey, (char)localeKey, (int)specialKey, (char)specialKey);
152152

153153
if (specialKey) {

0 commit comments

Comments
 (0)