File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -214,7 +214,7 @@ function (cell_list::CellList)(system::Particles, i::Int)
214214 neighbour_cells = cell_list. neighbour_cells[c]
215215 # Scan the neighbourhood of cell mc (including itself)
216216 # and from there scan atoms in cell c2
217- return (j for c2 in neighbour_cells for j in @inbounds cell_list. cells[c2])
217+ return (j for c2 in @inbounds neighbour_cells for j in @inbounds cell_list. cells[c2])
218218end
219219
220220
@@ -331,17 +331,17 @@ function Base.iterate(neighbour_list::LinkedIterator, state=-1)
331331 return nothing
332332 end
333333 c, c_state = next
334- j = neighbour_list. head[c]
334+ @inbounds j = neighbour_list. head[c]
335335 else
336336 c_state, j = state
337- j = neighbour_list. list[j]
337+ @inbounds j = neighbour_list. list[j]
338338 if j == - 1
339339 next = iterate(neighbour_list. neighbour_cells, c_state)
340340 if next == nothing
341341 return nothing
342342 end
343343 c, c_state = next
344- j = neighbour_list. head[c]
344+ @inbounds j = neighbour_list. head[c]
345345 end
346346 end
347347
You can’t perform that action at this time.
0 commit comments