Skip to content

Commit

Permalink
add explanatory comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan Riley authored and Dan Riley committed May 18, 2023
1 parent eac41da commit d867318
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
10 changes: 7 additions & 3 deletions RecoTracker/MkFitCore/src/MkFinder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,11 @@ namespace mkfit {
};

if (L.is_barrel()) {
// Pull out the part of the loop that vectorizes
// Pull out the part of the loop that vectorizes with icc and gcc
// In llvm16 clang issues a warning that it can't vectorize
// the loop. Unfortunately, there doesn't seem to be a
// pragma to suppress the warning, so we ifdef it out. This
// should be rechecked if llvm vectorization improves.
#if !defined(__clang__)
#pragma omp simd
#endif
Expand Down Expand Up @@ -341,7 +345,7 @@ namespace mkfit {
//layer half-thikness for dphi spread calculation; only for very restrictive iters
const float layerD = std::abs(L.layer_info()->zmax() - L.layer_info()->zmin()) * 0.5f *
(m_iteration_params->maxConsecHoles == 0 || m_iteration_params->maxHolesPerCand == 0);
// Pull out the part of the loop that vectorizes
// Pull out the part of the loop that vectorizes with icc and gcc
#if !defined(__clang__)
#pragma omp simd
#endif
Expand Down Expand Up @@ -1210,7 +1214,7 @@ namespace mkfit {
m_prop_config->finding_intra_layer_pflags,
m_prop_config->finding_requires_propagation_to_hit_pos);

//#pragma omp simd // DOES NOT VECTORIZE AS IT IS NOW
//#pragma omp simd // DOES NOT VECTORIZE AS IT IS NOW
for (int itrack = 0; itrack < N_proc; ++itrack) {
// We can be in failed state from the initial propagation before selectHitIndices
// and there hit_count for track is set to -1 and WSR state to Failed, handled below.
Expand Down
3 changes: 3 additions & 0 deletions RecoTracker/MkFitCore/src/PropagationMPlex.cc
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,9 @@ namespace mkfit {
MPlexLL errorPropTmp(0.f); //initialize to zero
MPlexLL errorPropSwap(0.f); //initialize to zero

// loop does not vectorize with llvm16, and it issues a warning
// that apparently can't be suppressed with a pragma. Needs to
// be rechecked if future llvm versions improve vectorization.
#if !defined(__clang__)
#pragma omp simd
#endif
Expand Down

0 comments on commit d867318

Please sign in to comment.