Skip to content

Commit

Permalink
Test for simd build (#534)
Browse files Browse the repository at this point in the history
  • Loading branch information
alamb authored Jul 13, 2021
1 parent 541dae0 commit d6334aa
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,12 @@ jobs:
export CARGO_TARGET_DIR="/github/home/target"
cd arrow
cargo test --features "simd"
- name: Check new project build with simd features
run: |
export CARGO_HOME="/github/home/.cargo"
export CARGO_TARGET_DIR="/github/home/target"
cd arrow/test/dependency/simd
cargo check
windows-and-macos:
name: Test on ${{ matrix.os }} Rust ${{ matrix.rust }}
Expand Down
4 changes: 2 additions & 2 deletions arrow/src/compute/kernels/comparison.rs
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,7 @@ where

let bitmask = T::mask_to_u64(&simd_result);
let bytes = bitmask.to_le_bytes();
&result_slice[0..lanes / 8].copy_from_slice(&bytes[0..lanes / 8]);
result_slice[0..lanes / 8].copy_from_slice(&bytes[0..lanes / 8]);

&mut result_slice[lanes / 8..]
},
Expand Down Expand Up @@ -669,7 +669,7 @@ where

let bitmask = T::mask_to_u64(&simd_result);
let bytes = bitmask.to_le_bytes();
&result_slice[0..lanes / 8].copy_from_slice(&bytes[0..lanes / 8]);
result_slice[0..lanes / 8].copy_from_slice(&bytes[0..lanes / 8]);

&mut result_slice[lanes / 8..]
},
Expand Down
29 changes: 29 additions & 0 deletions arrow/test/dependency/simd/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

[package]
name = "defeault-features"
description = "Models a user application of arrow that uses the simd feature of arrow"
version = "0.1.0"
edition = "2018"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
arrow = { path = "../../../../arrow", version = "5.0.0-SNAPSHOT", features = ["simd"]}

[workspace]
3 changes: 3 additions & 0 deletions arrow/test/dependency/simd/src/main.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
fn main() {
println!("Hello, world!");
}

0 comments on commit d6334aa

Please sign in to comment.