Skip to content

Commit d670143

Browse files
committed
highway removed.
1 parent 367a9b4 commit d670143

25 files changed

Lines changed: 29 additions & 1017 deletions

CMakeLists.txt

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,6 @@ option(DTWC_DEV_MODE "Enable developer-only warnings, analyzers, and sanitizer o
2626

2727
option(DTWC_ENABLE_GUROBI "Enable Gurobi MIP solver" ON)
2828
option(DTWC_ENABLE_HIGHS "Enable HiGHS MIP solver" ON)
29-
# SIMD via Google Highway: ON by default for standalone top-level builds.
30-
# Provides runtime ISA dispatch (SSE4 → AVX2 → AVX-512) — ideal for HPC heterogeneous fleets.
31-
# Disabled automatically for Python wheels and sub-project consumption.
32-
cmake_dependent_option(DTWC_ENABLE_SIMD
33-
"Enable SIMD acceleration via Google Highway (runtime ISA dispatch)"
34-
ON "PROJECT_IS_TOP_LEVEL;NOT DTWC_BUILD_PYTHON"
35-
OFF)
3629
option(DTWC_ENABLE_MPI "Enable MPI distributed computing" OFF)
3730
option(DTWC_ENABLE_CUDA "Enable CUDA GPU acceleration" OFF)
3831
option(DTWC_ENABLE_YAML "Enable YAML configuration file support via yaml-cpp" OFF)

benchmarks/bench_dtw_baseline.cpp

Lines changed: 0 additions & 96 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,6 @@
1515
#include <core/lower_bound_impl.hpp>
1616
#include <core/z_normalize.hpp>
1717

18-
#ifdef DTWC_HAS_HIGHWAY
19-
#include <simd/multi_pair_dtw.hpp>
20-
namespace dtwc::simd {
21-
double lb_keogh_highway(const double *, const double *, const double *, std::size_t);
22-
void z_normalize_highway(double *, std::size_t);
23-
} // namespace dtwc::simd
24-
#endif
25-
2618
#include <vector>
2719
#include <random>
2820
#include <string>
@@ -452,91 +444,3 @@ BENCHMARK(BM_compute_envelopes)
452444
->Args({4000, 50})
453445
->Unit(benchmark::kNanosecond);
454446

455-
// ---------------------------------------------------------------------------
456-
// SIMD vs scalar A/B comparisons (compiled only when DTWC_HAS_HIGHWAY is set)
457-
// ---------------------------------------------------------------------------
458-
459-
#ifdef DTWC_HAS_HIGHWAY
460-
461-
static void BM_lb_keogh_highway(benchmark::State &state)
462-
{
463-
const auto len = static_cast<size_t>(state.range(0));
464-
auto query = random_series(len, 42);
465-
auto candidate = random_series(len, 43);
466-
std::vector<double> upper(len), lower(len);
467-
dtwc::core::compute_envelopes(candidate.data(), len, 10, upper.data(), lower.data());
468-
469-
for (auto _ : state) {
470-
benchmark::DoNotOptimize(
471-
dtwc::simd::lb_keogh_highway(query.data(), upper.data(), lower.data(), len));
472-
}
473-
state.SetItemsProcessed(static_cast<int64_t>(state.iterations()));
474-
state.SetComplexityN(static_cast<int64_t>(len));
475-
}
476-
BENCHMARK(BM_lb_keogh_highway)
477-
->Arg(100)->Arg(500)->Arg(1000)->Arg(4000)->Arg(8000)
478-
->Unit(benchmark::kNanosecond)->Complexity();
479-
480-
static void BM_z_normalize_highway(benchmark::State &state)
481-
{
482-
const auto len = static_cast<size_t>(state.range(0));
483-
auto series_data = random_series(len, 42);
484-
485-
for (auto _ : state) {
486-
state.PauseTiming();
487-
auto copy = series_data;
488-
state.ResumeTiming();
489-
dtwc::simd::z_normalize_highway(copy.data(), copy.size());
490-
benchmark::DoNotOptimize(copy.data());
491-
}
492-
state.SetItemsProcessed(static_cast<int64_t>(state.iterations()));
493-
state.SetComplexityN(static_cast<int64_t>(len));
494-
}
495-
BENCHMARK(BM_z_normalize_highway)
496-
->Arg(100)->Arg(500)->Arg(1000)->Arg(4000)->Arg(8000)
497-
->Unit(benchmark::kNanosecond)->Complexity();
498-
499-
static void BM_dtw_4pairs_sequential(benchmark::State &state)
500-
{
501-
const auto len = static_cast<size_t>(state.range(0));
502-
std::vector<std::vector<double>> xs(4), ys(4);
503-
for (int p = 0; p < 4; ++p) {
504-
xs[p] = random_series(len, 100 + p * 2);
505-
ys[p] = random_series(len, 101 + p * 2);
506-
}
507-
for (auto _ : state) {
508-
double total = 0;
509-
for (int p = 0; p < 4; ++p)
510-
total += dtwc::dtwFull_L<double>(xs[p], ys[p]);
511-
benchmark::DoNotOptimize(total);
512-
}
513-
state.SetItemsProcessed(static_cast<int64_t>(state.iterations()) * 4);
514-
}
515-
BENCHMARK(BM_dtw_4pairs_sequential)
516-
->Arg(100)->Arg(500)->Arg(1000)
517-
->Unit(benchmark::kMicrosecond);
518-
519-
static void BM_dtw_4pairs_simd(benchmark::State &state)
520-
{
521-
const auto len = static_cast<size_t>(state.range(0));
522-
std::vector<std::vector<double>> xs(4), ys(4);
523-
for (int p = 0; p < 4; ++p) {
524-
xs[p] = random_series(len, 100 + p * 2);
525-
ys[p] = random_series(len, 101 + p * 2);
526-
}
527-
const double *x_ptrs[4] = {xs[0].data(), xs[1].data(), xs[2].data(), xs[3].data()};
528-
const double *y_ptrs[4] = {ys[0].data(), ys[1].data(), ys[2].data(), ys[3].data()};
529-
std::size_t x_lens[4] = {len, len, len, len};
530-
std::size_t y_lens[4] = {len, len, len, len};
531-
532-
for (auto _ : state) {
533-
auto result = dtwc::simd::dtw_multi_pair(x_ptrs, y_ptrs, x_lens, y_lens, 4);
534-
benchmark::DoNotOptimize(result);
535-
}
536-
state.SetItemsProcessed(static_cast<int64_t>(state.iterations()) * 4);
537-
}
538-
BENCHMARK(BM_dtw_4pairs_simd)
539-
->Arg(100)->Arg(500)->Arg(1000)
540-
->Unit(benchmark::kMicrosecond);
541-
542-
#endif // DTWC_HAS_HIGHWAY

benchmarks/results/baseline_20260328_173431.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"context": {
33
"date": "2026-03-28T17:34:31+00:00",
4-
"host_name": "ENGS-32384",
5-
"executable": "C:\\D\\git\\dtw-cpp\\build2\\bin\\bench_dtw_baseline.exe",
4+
"host_name": "",
5+
"executable": "bench_dtw_baseline.exe",
66
"num_cpus": 24,
77
"mhz_per_cpu": 2496,
88
"caches": [

benchmarks/results/baseline_head_20260403.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"context": {
33
"date": "2026-04-03T17:23:07+01:00",
4-
"host_name": "ENGS-30288",
5-
"executable": "C:\\D\\git\\dtw-cpp\\build_bench\\bin\\bench_dtw_baseline.exe",
4+
"host_name": "",
5+
"executable": "bench_dtw_baseline.exe",
66
"num_cpus": 20,
77
"mhz_per_cpu": 2803,
88
"caches": [

benchmarks/results/baseline_phase0_after.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"context": {
33
"date": "2026-04-04T00:08:23+01:00",
4-
"host_name": "ENGS-30288",
5-
"executable": "C:\\D\\git\\dtw-cpp\\build_bench\\bin\\bench_dtw_baseline.exe",
4+
"host_name": "",
5+
"executable": "bench_dtw_baseline.exe",
66
"num_cpus": 20,
77
"mhz_per_cpu": 2803,
88
"caches": [

benchmarks/results/baseline_phase0_before.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"context": {
33
"date": "2026-04-04T00:00:28+01:00",
4-
"host_name": "ENGS-30288",
5-
"executable": "C:\\D\\git\\dtw-cpp\\build_bench\\bin\\bench_dtw_baseline.exe",
4+
"host_name": "",
5+
"executable": "bench_dtw_baseline.exe",
66
"num_cpus": 20,
77
"mhz_per_cpu": 2803,
88
"caches": [

benchmarks/results/bench_39c4913.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"context": {
33
"date": "2026-03-28T17:34:31+00:00",
4-
"host_name": "ENGS-32384",
5-
"executable": "C:\\D\\git\\dtw-cpp\\build2\\bin\\bench_dtw_baseline.exe",
4+
"host_name": "",
5+
"executable": "bench_dtw_baseline.exe",
66
"num_cpus": 24,
77
"mhz_per_cpu": 2496,
88
"caches": [

benchmarks/results/bench_hpc_fixes.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"context": {
33
"date": "2026-03-28T17:52:09+00:00",
4-
"host_name": "ENGS-32384",
5-
"executable": "C:\\D\\git\\dtw-cpp\\build2\\bin\\bench_dtw_baseline.exe",
4+
"host_name": "",
5+
"executable": "bench_dtw_baseline.exe",
66
"num_cpus": 24,
77
"mhz_per_cpu": 2496,
88
"caches": [

benchmarks/results/bench_subphase_a.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"context": {
33
"date": "2026-03-28T21:43:26+00:00",
4-
"host_name": "ENGS-32384",
5-
"executable": "C:\\D\\git\\dtw-cpp\\build2\\bin\\bench_dtw_baseline.exe",
4+
"host_name": "",
5+
"executable": "bench_dtw_baseline.exe",
66
"num_cpus": 24,
77
"mhz_per_cpu": 2496,
88
"caches": [

benchmarks/results/phase1_baseline.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"context": {
33
"date": "2026-04-03T18:49:09+01:00",
4-
"host_name": "ENGS-30288",
5-
"executable": "C:\\D\\git\\dtw-cpp\\build_bench\\bin\\bench_dtw_baseline.exe",
4+
"host_name": "",
5+
"executable": "bench_dtw_baseline.exe",
66
"num_cpus": 20,
77
"mhz_per_cpu": 2803,
88
"caches": [

0 commit comments

Comments
 (0)