Skip to content

Commit 6030e21

Browse files
committed
Fix typo
1 parent 1aaa964 commit 6030e21

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

src/costs.jl

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,21 +35,21 @@ Base.isequal(ins1::Instruction, ins2::Instruction) = (ins1.instr === ins2.instr)
3535
const LOOPCONSTANT = Instruction(gensym())
3636

3737
struct InstructionCost
38-
scaling::Float64 # sentinel values: -3 == no scaling; -2 == offset_scaling, -1 == linear scaling, >0 -> == latency == reciprical throughput
39-
scalar_reciprical_throughput::Float64
38+
scaling::Float64 # sentinel values: -3 == no scaling; -2 == offset_scaling, -1 == linear scaling, >0 -> == latency == reciprocal throughput
39+
scalar_reciprocal_throughput::Float64
4040
scalar_latency::Int
4141
register_pressure::Int
4242
end
4343
InstructionCost(sl::Int, srt::Float64, scaling::Float64 = -3.0) = InstructionCost(scaling, srt, sl, 0)
4444

45-
nocost(c::InstructionCost) = c.scalar_reciprical_throughput == 0.0
45+
nocost(c::InstructionCost) = c.scalar_reciprocal_throughput == 0.0
4646
flatcost(c::InstructionCost) = c.scaling == -3.0
4747
offsetscaling(c::InstructionCost) = c.scaling == -2.0
4848
linearscaling(c::InstructionCost) = c.scaling == -1.0
4949

5050
function scalar_cost(ic::InstructionCost)#, ::Type{T} = Float64) where {T}
51-
@unpack scalar_reciprical_throughput, scalar_latency, register_pressure = ic
52-
scalar_reciprical_throughput, scalar_latency, register_pressure
51+
@unpack scalar_reciprocal_throughput, scalar_latency, register_pressure = ic
52+
scalar_reciprocal_throughput, scalar_latency, register_pressure
5353
end
5454
function vector_cost(ic::InstructionCost, Wshift, sizeof_T)
5555
srt, sl, srp = scalar_cost(ic)
@@ -68,7 +68,7 @@ function vector_cost(ic::InstructionCost, Wshift, sizeof_T)
6868
else # we assume custom cost, and that latency == recip_throughput
6969
scaling = ic.scaling
7070
sl, srt = round(Int,scaling), scaling
71-
end
71+
end
7272
srt, sl, srp
7373
end
7474
# instruction_cost(instruction::Symbol) = get(COST, instruction, OPAQUE_INSTRUCTION)
@@ -278,7 +278,7 @@ function reduction_combine_to(x::Float64)
278278
x == 1.0 ? :reduce_to_add : x == 2.0 ? :reduce_to_prod : x == 5.0 ? :reduce_to_max : x == 6.0 ? :reduce_to_min : throw("Reduction not found.")
279279
end
280280
reduction_combine_to(x) = reduction_combine_to(reduction_instruction_class(x))
281-
function reduction_zero(x::Float64)
281+
function reduction_zero(x::Float64)
282282
# x == 1.0 ? :zero : x == 2.0 ? :one : x == 3.0 ? :false : x == 4.0 ? :true : x == 5.0 ? :typemin : x == 6.0 ? :typemax : throw("Reduction not found.")
283283
x == 1.0 ? :zero : x == 2.0 ? :one : x == 5.0 ? :typemin : x == 6.0 ? :typemax : throw("Reduction not found.")
284284
end
@@ -373,4 +373,3 @@ const FUNCTIONSYMBOLS = Dict{Type{<:Function},Instruction}(
373373
typeof(ifelse) => :vifelse,
374374
typeof(vifelse) => :vifelse
375375
)
376-

0 commit comments

Comments
 (0)