Skip to content

Commit 836a32a

Browse files
committed
minor: disable hash3d for 64 bit
1 parent 5d2a7fa commit 836a32a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/noise/hash3d_64.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ where
2929
3030
#[inline(always)]
3131
pub unsafe fn hash3d<S: Simd>(seed: i64, i: S::Vi64, j: S::Vi64, k: S::Vi64) -> Hash3d<S> {
32+
// This 64 bit variant is not implemented.
33+
// The codeblock below is just the 64 bit SIMD instructions with the 32 bit magic numbers.
34+
// I don't know what values the Hash3d fields should hold or what magic number are needed for the bit shifts.
35+
unimplemented!();
3236
let mut hash = S::xor_epi64(i, S::set1_epi64(seed));
3337
hash = S::xor_epi64(j, hash);
3438
hash = S::xor_epi64(k, hash);
@@ -41,7 +45,6 @@ pub unsafe fn hash3d<S: Simd>(seed: i64, i: S::Vi64, j: S::Vi64, k: S::Vi64) ->
4145
Hash3d::new(
4246
S::castepi64_pd(S::cmplt_epi64(hasha13, S::set1_epi64(8))),
4347
S::castepi64_pd(S::cmplt_epi64(hasha13, S::set1_epi64(2))),
44-
//? magic numbers
4548
S::castepi64_pd(S::cmpeq_epi64(S::set1_epi64(12), hasha13)),
4649
S::castepi64_pd(S::slli_epi64(hash, 31)),
4750
S::castepi64_pd(S::slli_epi64(S::and_epi64(hash, S::set1_epi64(2)), 30)),

0 commit comments

Comments
 (0)