/* eg_metal_cosine_stub.c — plain-C, zero-dependency implementation of the * eg_metal_cosine.h contract for platforms without Metal (Linux CI, or any * build that simply chooses not to link the real Objective-C bridge). * * Always returns false / unavailable. Callers already treat that as "fall * back to the CPU path" unconditionally — this file exists so that exactly * one of {eg_metal_cosine.m, eg_metal_cosine_stub.c} is linked per build, * selected by the build script (Darwin → the real bridge + Metal frameworks; * everything else → this stub, no framework flags, no Objective-C compiler * needed), and el_runtime.c / vindex_bench.c never need an #ifdef to call * eg_cosine_batch_metal() — the symbol always exists, its behavior is what * varies by platform. */ #include "eg_metal_cosine.h" bool eg_cosine_batch_metal_available(void) { return false; } bool eg_cosine_batch_metal(const float* query, int32_t qdim, const float* const* node_ptrs, const int32_t* node_dims, int32_t n, double* out_scores) { (void)query; (void)qdim; (void)node_ptrs; (void)node_dims; (void)n; (void)out_scores; return false; } bool eg_cosine_batch_metal_multi(const float* queries, int32_t qdim, int32_t nq, const float* const* node_ptrs, const int32_t* node_dims, int32_t n, double* out_scores) { (void)queries; (void)qdim; (void)nq; (void)node_ptrs; (void)node_dims; (void)n; (void)out_scores; return false; }