Skip to content

Commit de7baaa

Browse files
committed
Add a few more costs.
1 parent 6c559bb commit de7baaa

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/costs.jl

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,10 +142,16 @@ const COST = Dict{Symbol,InstructionCost}(
142142
:reduced_prod => InstructionCost(4,0.5),# ignoring reduction part of cost, might be nop
143143
:reduce_to_add => InstructionCost(0,0.0,0.0,0),
144144
:reduce_to_prod => InstructionCost(0,0.0,0.0,0),
145+
:abs => InstructionCost(1, 0.5),
145146
:abs2 => InstructionCost(4,0.5),
146147
:vabs2 => InstructionCost(4,0.5),
147148
:(==) => InstructionCost(1, 0.5),
149+
:(!=) => InstructionCost(1, 0.5),
150+
:(isnan) => InstructionCost(1, 0.5),
151+
:(isfinite) => InstructionCost(2, 1.0),
152+
:(isinf) => InstructionCost(2, 1.0),
148153
:isequal => InstructionCost(1, 0.5),
154+
:(!) => InstructionCost(1, 0.5),
149155
:(~) => InstructionCost(1, 0.5),
150156
:(&) => InstructionCost(1, 0.5),
151157
:(|) => InstructionCost(1, 0.5),
@@ -341,7 +347,15 @@ const FUNCTIONSYMBOLS = IdDict{Type{<:Function},Instruction}(
341347
typeof(SIMDPirates.vdiv) => :(/),
342348
typeof(Base.FastMath.div_fast) => :(/),
343349
typeof(==) => :(==),
350+
typeof(!=) => :(!=),
344351
typeof(isequal) => :isequal,
352+
typeof(isnan) => :isnan,
353+
typeof(isinf) => :isinf,
354+
typeof(isfinite) => :isfinite,
355+
typeof(abs) => :abs,
356+
typeof(abs2) => :abs2,
357+
typeof(~) => :(~),
358+
typeof(!) => :(!),
345359
typeof(&) => :(&),
346360
typeof(|) => :(|),
347361
typeof() => :(),

0 commit comments

Comments
 (0)