Skip to content

Commit

Permalink
amdilc: increase minimum buffer size for source and destination modif…
Browse files Browse the repository at this point in the history
…iers
  • Loading branch information
Cherser-s committed Dec 29, 2022
1 parent 3e9c3f5 commit 4759db2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/amdilc/amdilc_decoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ static void reserveSources(
unsigned size = (kernel->srcCount + srcCount) * sizeof(Source);
if (kernel->srcSize < size) {
if (kernel->srcSize == 0) {
kernel->srcSize = sizeof(Source);
kernel->srcSize = sizeof(Source) * 128;
}
while (kernel->srcSize < size) {
kernel->srcSize *= BUFFER_ALLOC_FACTOR;
Expand All @@ -194,7 +194,7 @@ static void reserveDestinations(
unsigned size = (kernel->dstCount + dstCount) * sizeof(Destination);
if (kernel->dstSize < size) {
if (kernel->dstSize == 0) {
kernel->dstSize = sizeof(Destination);
kernel->dstSize = sizeof(Destination) * 128;
}
while (kernel->dstSize < size) {
kernel->dstSize *= BUFFER_ALLOC_FACTOR;
Expand All @@ -214,7 +214,7 @@ static unsigned reserveExtras(
unsigned currentExtrasCount = kernel->extraCount;
if (kernel->extraSize < size) {
if (kernel->extraSize == 0) {
kernel->extraSize = sizeof(Token);
kernel->extraSize = sizeof(Token) * 128;
}
while (kernel->extraSize < size) {
kernel->extraSize *= BUFFER_ALLOC_FACTOR;
Expand Down

0 comments on commit 4759db2

Please sign in to comment.