diff options
| author | azidar | 2016-01-23 16:11:40 -0800 |
|---|---|---|
| committer | azidar | 2016-01-23 16:11:40 -0800 |
| commit | 4426f118831a95869adf5e55bbff99c1951ac0ed (patch) | |
| tree | 365a4c6fa8b7174ca60d97a15a6bc6d92248c2a1 /src/main/stanza/ir-utils.stanza | |
| parent | bc8a54c292f5e9d8a61571cbc814950ef2927842 (diff) | |
Fixed bug where the write mask wasn't being generated correctly
Diffstat (limited to 'src/main/stanza/ir-utils.stanza')
| -rw-r--r-- | src/main/stanza/ir-utils.stanza | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/main/stanza/ir-utils.stanza b/src/main/stanza/ir-utils.stanza index 7af75b57..fa4b296f 100644 --- a/src/main/stanza/ir-utils.stanza +++ b/src/main/stanza/ir-utils.stanza @@ -194,7 +194,7 @@ public defn get-valid-points (t1:Type,t2:Type,flip1:Flip,flip2:Flip) -> List<[In flip2 * flip(f2)) for x in ls do : add(points,[x[0] + ilen, x[1] + jlen]) - println(points) + ;println(points) jlen = jlen + get-size(type(fields(t2)[j])) ilen = ilen + get-size(type(fields(t1)[i])) jlen = 0 @@ -212,12 +212,12 @@ public defn get-valid-points (t1:Type,t2:Type,flip1:Flip,flip2:Flip) -> List<[In to-list(points) ;============= Useful functions ============== -public defn create-mask (n:Symbol,dt:Type) -> Field : - Field{n,DEFAULT,_} $ match(dt) : - (t:VectorType) : VectorType(BoolType(),size(t)) +public defn create-mask (dt:Type) -> Type : + match(dt) : + (t:VectorType) : VectorType(create-mask(type(t)),size(t)) (t:BundleType) : val fields* = for f in fields(t) map : - Field(name(f),flip(f),BoolType()) + Field(name(f),flip(f),create-mask(type(f))) BundleType(fields*) (t:UIntType|SIntType) : BoolType() |
