summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorCedric Nugteren <web@cedricnugteren.nl>2016-05-01 14:03:37 +0200
committerCedric Nugteren <web@cedricnugteren.nl>2016-05-01 14:03:37 +0200
commitbee2f943ec51a3482e89cf635a2d12b6b6d96b04 (patch)
treefc93c1bef6fa19846959e55685129f439e6cfce9 /scripts
parent9602c150aa3b7f0a392207bef8cbb6048b1da891 (diff)
Changed the index buffer of IxAMAX routines to unsigned int for proper buffersize checking
Diffstat (limited to 'scripts')
-rw-r--r--scripts/generator/routine.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/scripts/generator/routine.py b/scripts/generator/routine.py
index 47790a55..95681da6 100644
--- a/scripts/generator/routine.py
+++ b/scripts/generator/routine.py
@@ -81,6 +81,10 @@ class Routine():
def OtherScalars(self):
return ["cos","sin"]
+ # List of buffers with unsigned int type
+ def IndexBuffers(self):
+ return ["imax","imin"]
+
# List of buffers without 'inc' or 'ld'
def BuffersWithoutLdInc(self):
return self.ScalarBuffersFirst() + self.ScalarBuffersSecond() + ["ap"]
@@ -145,7 +149,8 @@ class Routine():
# As above but with Claduc buffers
def BufferCladuc(self, name):
if (name in self.inputs) or (name in self.outputs):
- a = ["Buffer<"+self.template.buffertype+">("+name+"_buffer)"]
+ buffertype = "unsigned int" if (name in self.IndexBuffers()) else self.template.buffertype
+ a = ["Buffer<"+buffertype+">("+name+"_buffer)"]
b = [name+"_offset"]
c = [name+"_"+self.Postfix(name)] if (name not in self.BuffersWithoutLdInc()) else []
return [", ".join(a+b+c)]