@@ -197,8 +197,20 @@ const COST = Dict{Instruction,InstructionCost}(
197
197
Instruction (:identity ) => InstructionCost (0 ,0.0 ,0.0 ,0 ),
198
198
Instruction (:adjoint ) => InstructionCost (0 ,0.0 ,0.0 ,0 ),
199
199
Instruction (:transpose ) => InstructionCost (0 ,0.0 ,0.0 ,0 ),
200
- Instruction (:prefetch ) => InstructionCost (0 ,0.0 ,0.0 ,0 )
200
+ Instruction (:prefetch ) => InstructionCost (0 ,0.0 ,0.0 ,0 ),
201
+ Instruction (:prefetch1 ) => InstructionCost (0 ,0.0 ,0.0 ,0 ),
202
+ Instruction (:prefetch2 ) => InstructionCost (0 ,0.0 ,0.0 ,0 ),
203
+ Instruction (:prefetch3 ) => InstructionCost (0 ,0.0 ,0.0 ,0 )
201
204
)
205
+ @inline prefetch0 (x, i) = SIMDPirates. prefetch (gep (stridedpointer (x), (extract_data (i) - 1 ,)), Val {3} (), Val {0} ())
206
+ @inline prefetch0 (x, i, j) = SIMDPirates. prefetch (gep (stridedpointer (x), (extract_data (i) - 1 , extract_data (j) - 1 )), Val {3} (), Val {0} ())
207
+ # @inline prefetch0(x, i, j, oi, oj) = SIMDPirates.prefetch(gep(stridedpointer(x), (extract_data(i) + extract_data(oi) - 1, extract_data(j) + extract_data(oj) - 1)), Val{3}(), Val{0}())
208
+ @inline prefetch1 (x, i) = SIMDPirates. prefetch (gep (stridedpointer (x), (extract_data (i) - 1 ,)), Val {2} (), Val {0} ())
209
+ @inline prefetch1 (x, i, j) = SIMDPirates. prefetch (gep (stridedpointer (x), (extract_data (i) - 1 , VectorizationBase. extract_data (j) - 1 )), Val {2} (), Val {0} ())
210
+ # @inline prefetch1(x, i, j, oi, oj) = SIMDPirates.prefetch(gep(stridedpointer(x), (extract_data(i) + extract_data(oi) - 1, extract_data(j) + extract_data(oj) - 1)), Val{2}(), Val{0}())
211
+ @inline prefetch2 (x, i) = SIMDPirates. prefetch (gep (stridedpointer (x), (extract_data (i) - 1 ,)), Val {1} (), Val {0} ())
212
+ @inline prefetch2 (x, i, j) = SIMDPirates. prefetch (gep (stridedpointer (x), (VectorizationBase. extract_data (i) - 1 , VectorizationBase. extract_data (j) - 1 )), Val {1} (), Val {0} ())
213
+ # @inline prefetch2(x, i, j, oi, oj) = SIMDPirates.prefetch(gep(stridedpointer(x), (extract_data(i) + extract_data(oi) - 1, extract_data(j) + extract_data(oj) - 1)), Val{1}(), Val{0}())
202
214
203
215
# const KNOWNINSTRUCTIONS = keys(COST)
204
216
# instruction(f, m) = f ∈ KNOWNINSTRUCTIONS ? Instruction(:LoopVectorization, f) : Instruction(m, f)
0 commit comments