Skip to content

Commit

Permalink
Merge branch 'main' into cpp17
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan Smith committed Jan 23, 2024
2 parents 84c6a4d + f327864 commit 5698c12
Show file tree
Hide file tree
Showing 3 changed files with 152 additions and 147 deletions.
14 changes: 7 additions & 7 deletions six/modules/c++/six.sicd/include/six/sicd/NearestNeighbors.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,15 @@ struct NearestNeighbors final
uint8_t find_nearest(six::zfloat phase_direction, six::zfloat v) const;
uint8_t getPhase(six::zfloat) const;

#if SIX_sicd_ComplexToAMP8IPHS8I_unseq
template<typename ZFloatV, size_t N>
auto nearest_neighbors_unseq_T(const std::array<const zfloat, N>&) const; // TODO: std::span<T, N> ... ?
template<typename ZFloatV, int elements_per_iteration>
void nearest_neighbors_unseq_(std::span<const zfloat> inputs, std::span<AMP8I_PHS8I_t> results) const;
#if SIX_sicd_ComplexToAMP8IPHS8I_unseq
void nearest_neighbors_(execution_policy, std::span<const zfloat> inputs, std::span<AMP8I_PHS8I_t> results) const;

template<typename ZFloatV>
auto unseq_nearest_neighbors(std::span<const zfloat> p) const; // TODO: std::span<T, N> ... ?

template<typename ZFloatV, int elements_per_iteration>
void nearest_neighbors_par_unseq_T(std::span<const zfloat> inputs, std::span<AMP8I_PHS8I_t> results) const;
#endif
void nearest_neighbors_T(execution_policy, std::span<const zfloat> inputs, std::span<AMP8I_PHS8I_t> results) const;
#endif

};
}
Expand Down
3 changes: 2 additions & 1 deletion six/modules/c++/six.sicd/source/NearestNeighbors.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,9 @@ void six::sicd::NearestNeighbors::nearest_neighbors(execution_policy policy, std
// > all standard execution policies can fall back to sequential execution.
#if CODA_OSS_DEBUG
throw std::logic_error("Unhandled execution_policy value.");
#endif
#else
return nearest_neighbors(inputs, results); // no policy specified, "default policy"
#endif
}

AMP8I_PHS8I six::sicd::nearest_neighbor(const details::ComplexToAMP8IPHS8I& converter_, const zfloat& v)
Expand Down
Loading

0 comments on commit 5698c12

Please sign in to comment.