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
......@@ -59,7 +59,7 @@ class TypedSymbol(sp.Symbol):
def _hashable_content(self):
superClassContents = list(super(TypedSymbol, self)._hashable_content())
return tuple(superClassContents + [hash(str(self._dtype))])
return tuple(superClassContents + [hash(self._dtype)])
def __getnewargs__(self):
return self.name, self.dtype
......@@ -232,6 +232,7 @@ if ir:
np.dtype(np.float64): ir.DoubleType(),
}
def peelOffType(dtype, typeToPeelOff):
while type(dtype) is typeToPeelOff:
dtype = dtype.baseType
......@@ -465,7 +466,7 @@ class VectorType(Type):
raise NotImplementedError()
def __hash__(self):
return hash(str(self))
return hash((self.baseType, self.width))
class PointerType(Type):
......@@ -502,7 +503,7 @@ class PointerType(Type):
return str(self)
def __hash__(self):
return hash(str(self))
return hash((self._baseType, self.const, self.restrict))
class StructType(object):
......
Markdown is supported
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