Skip to content
Snippets Groups Projects
Commit af435b7f authored by Martin Bauer's avatar Martin Bauer
Browse files

Bugfixes in CUDA indexed kernels

- alignment of index array when using additional data
- data types have been hashed incorrectly
parent 01859ef5
No related merge requests found
...@@ -59,7 +59,7 @@ class TypedSymbol(sp.Symbol): ...@@ -59,7 +59,7 @@ class TypedSymbol(sp.Symbol):
def _hashable_content(self): def _hashable_content(self):
superClassContents = list(super(TypedSymbol, self)._hashable_content()) superClassContents = list(super(TypedSymbol, self)._hashable_content())
return tuple(superClassContents + [hash(str(self._dtype))]) return tuple(superClassContents + [hash(self._dtype)])
def __getnewargs__(self): def __getnewargs__(self):
return self.name, self.dtype return self.name, self.dtype
...@@ -232,6 +232,7 @@ if ir: ...@@ -232,6 +232,7 @@ if ir:
np.dtype(np.float64): ir.DoubleType(), np.dtype(np.float64): ir.DoubleType(),
} }
def peelOffType(dtype, typeToPeelOff): def peelOffType(dtype, typeToPeelOff):
while type(dtype) is typeToPeelOff: while type(dtype) is typeToPeelOff:
dtype = dtype.baseType dtype = dtype.baseType
...@@ -465,7 +466,7 @@ class VectorType(Type): ...@@ -465,7 +466,7 @@ class VectorType(Type):
raise NotImplementedError() raise NotImplementedError()
def __hash__(self): def __hash__(self):
return hash(str(self)) return hash((self.baseType, self.width))
class PointerType(Type): class PointerType(Type):
...@@ -502,7 +503,7 @@ class PointerType(Type): ...@@ -502,7 +503,7 @@ class PointerType(Type):
return str(self) return str(self)
def __hash__(self): def __hash__(self):
return hash(str(self)) return hash((self._baseType, self.const, self.restrict))
class StructType(object): class StructType(object):
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment