Skip to content

Commit d6334aa

Browse files
authored
Test for simd build (apache#534)
1 parent 541dae0 commit d6334aa

File tree

4 files changed

+40
-2
lines changed

4 files changed

+40
-2
lines changed

.github/workflows/rust.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,12 @@ jobs:
161161
export CARGO_TARGET_DIR="/github/home/target"
162162
cd arrow
163163
cargo test --features "simd"
164+
- name: Check new project build with simd features
165+
run: |
166+
export CARGO_HOME="/github/home/.cargo"
167+
export CARGO_TARGET_DIR="/github/home/target"
168+
cd arrow/test/dependency/simd
169+
cargo check
164170
165171
windows-and-macos:
166172
name: Test on ${{ matrix.os }} Rust ${{ matrix.rust }}

arrow/src/compute/kernels/comparison.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -591,7 +591,7 @@ where
591591

592592
let bitmask = T::mask_to_u64(&simd_result);
593593
let bytes = bitmask.to_le_bytes();
594-
&result_slice[0..lanes / 8].copy_from_slice(&bytes[0..lanes / 8]);
594+
result_slice[0..lanes / 8].copy_from_slice(&bytes[0..lanes / 8]);
595595

596596
&mut result_slice[lanes / 8..]
597597
},
@@ -669,7 +669,7 @@ where
669669

670670
let bitmask = T::mask_to_u64(&simd_result);
671671
let bytes = bitmask.to_le_bytes();
672-
&result_slice[0..lanes / 8].copy_from_slice(&bytes[0..lanes / 8]);
672+
result_slice[0..lanes / 8].copy_from_slice(&bytes[0..lanes / 8]);
673673

674674
&mut result_slice[lanes / 8..]
675675
},

arrow/test/dependency/simd/Cargo.toml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
[package]
19+
name = "defeault-features"
20+
description = "Models a user application of arrow that uses the simd feature of arrow"
21+
version = "0.1.0"
22+
edition = "2018"
23+
24+
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
25+
26+
[dependencies]
27+
arrow = { path = "../../../../arrow", version = "5.0.0-SNAPSHOT", features = ["simd"]}
28+
29+
[workspace]
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
fn main() {
2+
println!("Hello, world!");
3+
}

0 commit comments

Comments
 (0)