source: icGREP/icgrep-devel/icgrep/kernels/attributes.cpp @ 5757

Last change on this file since 5757 was 5755, checked in by nmedfort, 19 months ago

Bug fixes and simplified MultiBlockKernel? logic

File size: 499 bytes
Line 
1#include "attributes.h"
2
3namespace kernel {
4
5void AttributeSet::addAttribute(Attribute attribute) {
6    for (Attribute & attr : *this) {
7        if (attr.getKind() == attribute.getKind()) {
8            attr.mK = attribute.mK;
9            return;
10        }
11    }
12    emplace_back(attribute);
13}
14
15bool AttributeSet::hasAttribute(const AttributeId id) const {
16    for (const Attribute & attr : *this) {
17        if (attr.getKind() == id) {
18            return true;
19        }
20    }
21    return false;
22}
23
24}
Note: See TracBrowser for help on using the repository browser.