diff --git a/cuburn/code/util.py b/cuburn/code/util.py index 1170247..4438aac 100644 --- a/cuburn/code/util.py +++ b/cuburn/code/util.py @@ -160,7 +160,7 @@ typedef struct { """) return tmpl.substitute( values = [(n, self.packed[n][1]) for n in self.packed_order], - padding = len(self) % (self.clsize / 4), + padding = self.align / 4 - len(self), tname = self.tname )