occ
Loading...
Searching...
No Matches
sorted_k_distances.h File Reference
#include <Eigen/Core>
#include <algorithm>
#include <array>
#include <cstring>
#include <limits>
Include dependency graph for sorted_k_distances.h:
This graph shows which files directly or indirectly include this file:

Classes

class  occ::descriptors::SortedKDistances< K >

Namespaces

namespace  occ
namespace  occ::descriptors

Macros

#define HAS_NEON   0
 High-performance helper class to maintain k smallest distances in sorted order.
#define HAS_AVX2   0

Typedefs

using occ::descriptors::SortedK1Distance = SortedKDistances<1>
using occ::descriptors::SortedK5Distances = SortedKDistances<5>
using occ::descriptors::SortedK10Distances = SortedKDistances<10>
using occ::descriptors::SortedK20Distances = SortedKDistances<20>
using occ::descriptors::SortedK50Distances = SortedKDistances<50>
using occ::descriptors::SortedK100Distances = SortedKDistances<100>

Macro Definition Documentation

◆ HAS_AVX2

#define HAS_AVX2   0

◆ HAS_NEON

#define HAS_NEON   0

High-performance helper class to maintain k smallest distances in sorted order.

Template parameter K allows compile-time optimizations and stack allocation Automatically uses NEON on ARM or AVX2 on x86

Optimizations:

  • No dynamic allocation - everything on stack
  • SIMD operations for comparisons and shifts (NEON or AVX2)
  • Batch insertion support for processing multiple values at once
  • Binary search for larger k values
  • Compile-time loop unrolling
  • Branchless operations where possible