SWDEV-361590 - Fix Palamida scan issue (#3020)
- Don't use code from Wikipedia (prohibited sources)
[ROCm/hip-tests commit: e7203b9706]
Dieser Commit ist enthalten in:
@@ -77,11 +77,7 @@ inline std::vector<char> alignArguments(std::vector<KernelArgument>& args) {
|
||||
for (auto& arg : args) {
|
||||
const char* argPtr{reinterpret_cast<const char*>(arg.ptr)};
|
||||
|
||||
/*
|
||||
* Details about the padding formula can be found at:
|
||||
* https://en.wikipedia.org/wiki/Data_structure_alignment#Data_structure_padding
|
||||
*/
|
||||
int paddingNeeded = -count & (arg.alignmentRequirement - 1);
|
||||
int paddingNeeded = (arg.alignmentRequirement - 1) & (~count + 1);
|
||||
alignedArguments.insert(std::end(alignedArguments), paddingNeeded, 0);
|
||||
count += paddingNeeded;
|
||||
|
||||
|
||||
In neuem Issue referenzieren
Einen Benutzer sperren