Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#64: Topk cosmetic changes for better code readability #53

Merged
merged 1 commit into from
Jan 24, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions common/inc/sfpu/ckernel_sfpu_topk.h
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ inline void _bitonic_topk_phases_steps(
topk_replay_init = -1;
}

template <bool APPROXIMATION_MODE, bool idir, int ITERATIONS>
template <bool APPROXIMATION_MODE, bool top_min, int ITERATIONS>
inline void _bitonic_topk_merge(const int m_iter, const int k)
{
uint dst_addr_offset = 0;
Expand All @@ -403,7 +403,7 @@ inline void _bitonic_topk_merge(const int m_iter, const int k)
while (datums_compared < total_datums_to_compare) {
for (uint ii=0; ii<inner_d; ii++) {
bitonic_topk_load8(dst_offset, ld_dist);
TTI_SFPSWAP(0, !idir ? p_sfpu::LREG0 : p_sfpu::LREG1, !idir ? p_sfpu::LREG1 : p_sfpu::LREG0, p_sfpswap::ALL_ROWS_MAX);
TTI_SFPSWAP(0, top_min ? p_sfpu::LREG1 : p_sfpu::LREG0, top_min ? p_sfpu::LREG0 : p_sfpu::LREG1, p_sfpswap::ALL_ROWS_MAX);
bitonic_topk_store8(dst_offset, ld_dist);
datums_compared += 8;
if (ii == (inner_d-1)) {
Expand Down
Loading