Skip to content

Commit dffdb7b

Browse files
committed
fix nits
1 parent 93d44b8 commit dffdb7b

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

.github/workflows/pgrx_test.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,5 +64,5 @@ jobs:
6464
id: runtests
6565
run: |
6666
cd pgvectorscale
67-
ls
68-
${{ matrix.platform.rustflags != '' && format('RUSTFLAGS="{0}"', matrix.platform.rustflags) || '' }} cargo pgrx test -- pg${{ matrix.pg.major }}
67+
${{ matrix.platform.rustflags != '' && format('export RUSTFLAGS="{0}"', matrix.platform.rustflags) || '' }}
68+
cargo pgrx test -- pg${{ matrix.pg.major }}

pgvectorscale/src/access_method/distance.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
/* we use the avx2 version of x86 functions. This verifies that's kosher */
22
#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
33
#[cfg(not(target_feature = "avx2"))]
4+
#[cfg(not(doc))]
45
compile_error!(
56
"On x86, the AVX2 feature must be enabled. Set RUSTFLAGS=\"-C target-feature=+avx2,+fma\""
67
);
78

89
pub fn init() {
910
#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
10-
if (!is_x86_feature_detected!("avx2") || !is_x86_feature_detected!("fma")) {
11+
if !is_x86_feature_detected!("avx2") || !is_x86_feature_detected!("fma") {
1112
panic!("On x86, pgvectorscale requires the CPU to support AVX2 and FMA. See https://github.com/timescale/pgvectorscale/issues/115");
1213
}
1314
}

pgvectorscale/src/access_method/distance_x86.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,14 @@ use simdeez::sse41::*;
77
use simdeez::avx2::*;
88

99
#[cfg(not(target_feature = "avx2"))]
10+
#[cfg(not(doc))]
1011
compile_error!(
1112
"On x86, the AVX2 feature must be enabled. Set RUSTFLAGS=\"-C target-feature=+avx2,+fma\""
1213
);
1314

1415
//note: without fmadd, the performance degrades pretty badly. Benchmark before disbaling
1516
#[cfg(not(target_feature = "fma"))]
17+
#[cfg(not(doc))]
1618
compile_error!(
1719
"On x86, the fma feature must be enabled. Set RUSTFLAGS=\"-C target-feature=+avx2,+fma\""
1820
);

0 commit comments

Comments
 (0)