Skip to content

Commit

Permalink
fix another wasm32 problem
Browse files Browse the repository at this point in the history
  • Loading branch information
llogiq committed Oct 24, 2023
1 parent 19edf30 commit 934ea0e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ authors = ["Andre Bogus <bogusandre@gmail.de>", "Joshua Landau <joshua@landau.ws
description = "count occurrences of a given byte, or the number of UTF-8 code points, in a byte slice, fast"
edition = "2018"
name = "bytecount"
version = "0.6.6"
version = "0.6.7"
license = "Apache-2.0/MIT"
repository = "https://github.com/llogiq/bytecount"
categories = ["algorithms", "no-std"]
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ The [newlinebench](https://github.com/llogiq/newlinebench) repository has furthe

To use bytecount in your crate, if you have [cargo-edit](https://github.com/killercup/cargo-edit), just type
`cargo add bytecount` in a terminal with the crate root as the current path. Otherwise you can manually edit your
`Cargo.toml` to add `bytecount = 0.6.6` to your `[dependencies]` section.
`Cargo.toml` to add `bytecount = 0.6.7` to your `[dependencies]` section.

In your crate root (`lib.rs` or `main.rs`, depending on if you are writing a
library or application), add `extern crate bytecount;`. Now you can simply use
Expand Down
2 changes: 1 addition & 1 deletion src/simd/wasm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ unsafe fn sum(u8s: v128) -> usize {
let u16s = u16x8_extadd_pairwise_u8x16(u8s);
let u32s = u32x4_extadd_pairwise_u16x8(u16s);
let (u1, u2, u3, u4) = (
u32x4_extract_lane::<0>(u32s),
u32x4_extract_lane::<1>(u32s),
u32x4_extract_lane::<2>(u32s),
u32x4_extract_lane::<3>(u32s),
u32x4_extract_lane::<4>(u32s),
);
((u1 + u2) + (u3 + u4)) as usize
}
Expand Down

0 comments on commit 934ea0e

Please sign in to comment.