mirror of https://github.com/commaai/tinygrad.git
real_remove_const (#7128)
This commit is contained in:
parent
2087abc999
commit
c23ef7e2f8
|
@ -113,8 +113,7 @@ class CStyleLanguage(Renderer):
|
|||
if isinstance(dt, ImageDType):
|
||||
return f"{'write_only' if mutable else 'read_only'} image2d_t"
|
||||
if isinstance(dt, PtrDType):
|
||||
return ("" if mutable else "const ") + (self.smem_prefix if dt.local else self.buffer_prefix) +\
|
||||
self.render_dtype(dt.base) + ("*" if isinstance(dt, PtrDType) else "")
|
||||
return (self.smem_prefix if dt.local else self.buffer_prefix) + self.render_dtype(dt.base) + ("*" if isinstance(dt, PtrDType) else "")
|
||||
return self.type_map.get(scalar:=dt.scalar(), scalar.name) + (str(dt.count) if (dt.count) > 1 else "")
|
||||
|
||||
def __getitem__(self, key): return self.r[key] # hacky helper
|
||||
|
|
Loading…
Reference in New Issue