Skip to content

Commit 353f023

Browse files
committed
using naive_findmin implementation
1 parent 0f47837 commit 353f023

File tree

4 files changed

+3
-14
lines changed

4 files changed

+3
-14
lines changed

Project.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ CodecZlib = "944b1d66-785c-5afd-91f1-9de20f533193"
99
CodecZstd = "6b39b394-51ab-5f42-8807-6242bab2b4c2"
1010
EnumX = "4e289a0a-7415-4d19-859d-a7e5c4648b56"
1111
Logging = "56ddb016-857b-54e1-b83d-db4d58db5568"
12-
LoopVectorization = "bdcacae8-1622-11e9-2a5c-532679323890"
1312
LorentzVectorHEP = "f612022c-142a-473f-8cfd-a09cf3793c6c"
1413
LorentzVectors = "3f54b04b-17fc-5cd4-9758-90c048d965e3"
1514
MuladdMacro = "46d2c3a1-f734-5fdb-9937-b9b9aeba4221"
@@ -32,7 +31,6 @@ EDM4hep = "0.4.0"
3231
EnumX = "1.0.4"
3332
JSON = "0.21"
3433
Logging = "1.9"
35-
LoopVectorization = "0.12.170"
3634
LorentzVectorHEP = "0.1.6"
3735
LorentzVectors = "0.4.3"
3836
Makie = "0.20, 0.21, 0.22"

src/PlainAlgo.jl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
using LoopVectorization
2-
31
"""
42
dist(i, j, rapidity_array, phi_array)
53

src/TiledAlgoLL.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55

66
using Logging
77
using Accessors
8-
using LoopVectorization
98

109
# Include struct definitions and basic operations
1110
include("TiledAlgoLLStructs.jl")

src/Utils.jl

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -147,13 +147,7 @@ array. The use of `@turbo` macro gives a significant performance boost.
147147
- `best`: The index of the minimum value in the `dij` array.
148148
"""
149149
fast_findmin(dij, n) = begin
150-
# findmin(@inbounds @view dij[1:n])
151-
best = 1
152-
@inbounds dij_min = dij[1]
153-
@turbo for here in 2:n
154-
newmin = dij[here] < dij_min
155-
best = newmin ? here : best
156-
dij_min = newmin ? dij[here] : dij_min
157-
end
158-
dij_min, best
150+
x = @fastmath foldl(min, dij)
151+
i = findfirst(==(x), dij)::Int
152+
x, i
159153
end

0 commit comments

Comments
 (0)