diff options
| author | Jack O'Connor <[email protected]> | 2019-12-03 18:54:51 -0500 |
|---|---|---|
| committer | Jack O'Connor <[email protected]> | 2019-12-04 16:53:31 -0500 |
| commit | a274a9b0faa444dd842a0584483eae6e97dbf21e (patch) | |
| tree | 0cc86f13ca10930dc0c69803a517be4cfff2ed4a /src/platform.rs | |
| parent | 7736b254cef487147408f13b175c1ac6d5c41b37 (diff) | |
add recursive subtree hashing
Diffstat (limited to 'src/platform.rs')
| -rw-r--r-- | src/platform.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/platform.rs b/src/platform.rs index 4a3be0d..1102404 100644 --- a/src/platform.rs +++ b/src/platform.rs @@ -8,6 +8,15 @@ pub const MAX_SIMD_DEGREE: usize = 8; #[cfg(not(any(target_arch = "x86", target_arch = "x86_64")))] pub const MAX_SIMD_DEGREE: usize = 1; +// There are some places where we want a static size that's equal to the +// MAX_SIMD_DEGREE, but also at least 2. Constant contexts aren't currently +// allowed to use cmp::max, so we have to hardcode this additional constant +// value. Get rid of this once cmp::max is a const fn. +#[cfg(any(target_arch = "x86", target_arch = "x86_64"))] +pub const MAX_SIMD_DEGREE_OR_2: usize = 8; +#[cfg(not(any(target_arch = "x86", target_arch = "x86_64")))] +pub const MAX_SIMD_DEGREE_OR_2: usize = 2; + #[derive(Clone, Copy, Debug)] pub enum Platform { Portable, |
