bool Array::IsSame(Type* that) const { const Array* at = that->AsArray(); if (!at) return false; return length_id_ == at->length_id_ && element_type_->IsSame(at->element_type_) && HasSameDecorations(that); }
bool Matrix::IsSame(Type* that) const { const Matrix* mt = that->AsMatrix(); if (!mt) return false; return count_ == mt->count_ && element_type_->IsSame(mt->element_type_) && HasSameDecorations(that); }
bool SampledImage::IsSame(Type* that) const { const SampledImage* sit = that->AsSampledImage(); if (!sit) return false; return image_type_->IsSame(sit->image_type_) && HasSameDecorations(that); }
bool Float::IsSame(Type* that) const { const Float* ft = that->AsFloat(); return ft && width_ == ft->width_ && HasSameDecorations(that); }
bool Vector::IsSame(Type* that) const { const Vector* vt = that->AsVector(); if (!vt) return false; return count_ == vt->count_ && element_type_->IsSame(vt->element_type_) && HasSameDecorations(that); }
bool Integer::IsSame(Type* that) const { const Integer* it = that->AsInteger(); return it && width_ == it->width_ && signed_ == it->signed_ && HasSameDecorations(that); }
bool ForwardPointer::IsSame(Type* that) const { const ForwardPointer* fpt = that->AsForwardPointer(); if (!fpt) return false; return target_id_ == fpt->target_id_ && storage_class_ == fpt->storage_class_ && HasSameDecorations(that); }
bool Pipe::IsSame(Type* that) const { const Pipe* pt = that->AsPipe(); if (!pt) return false; return access_qualifier_ == pt->access_qualifier_ && HasSameDecorations(that); }
bool Opaque::IsSame(Type* that) const { const Opaque* ot = that->AsOpaque(); if (!ot) return false; return name_ == ot->name_ && HasSameDecorations(that); }
bool RuntimeArray::IsSame(Type* that) const { const RuntimeArray* rat = that->AsRuntimeArray(); if (!rat) return false; return element_type_->IsSame(rat->element_type_) && HasSameDecorations(that); }