[yt-svn] commit/yt: 5 new changesets
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Tue Aug 11 08:22:00 PDT 2015
5 new commits in yt:
https://bitbucket.org/yt_analysis/yt/commits/c965ddd1887a/
Changeset: c965ddd1887a
Branch: yt
User: xarthisius
Date: 2015-08-06 19:31:31+00:00
Summary: Use stronger FNV hash instead of XOR hash for calculating selection hash
Affected #: 1 file
diff -r dec015906fc0dd799c4b01a3b3f0c9f3c75e1b9a -r c965ddd1887ab5ffdee2b915a438ac915016a0a2 yt/geometry/selection_routines.pyx
--- a/yt/geometry/selection_routines.pyx
+++ b/yt/geometry/selection_routines.pyx
@@ -446,7 +446,7 @@
@cython.wraparound(False)
@cython.cdivision(True)
cdef int fill_mask_selector(self, np.float64_t left_edge[3],
- np.float64_t right_edge[3],
+ np.float64_t right_edge[3],
np.float64_t dds[3], int dim[3],
np.ndarray[np.uint8_t, ndim=3, cast=True] child_mask,
np.ndarray[np.uint8_t, ndim=3] mask,
@@ -603,9 +603,11 @@
return mask.view("bool")
def __hash__(self):
+ # https://bitbucket.org/yt_analysis/yt/issues/1052/field-access-tests-fail-under-python3
+ # http://www.eternallyconfuzzled.com/tuts/algorithms/jsw_tut_hashing.aspx
cdef np.int64_t hash_val = 0
for v in self._hash_vals() + self._base_hash():
- hash_val ^= hash(v)
+ hash_val = (hash_val * 16777619) ^ hash(v) # FNV hash
return hash_val
def _hash_vals(self):
@@ -1107,7 +1109,7 @@
def _hash_vals(self):
return (("norm_vec[0]", self.norm_vec[0]),
- ("norm_vec[1]", self.norm_vec[1]),
+ ("norm_vec[1]", self.norm_vec[1]),
("norm_vec[2]", self.norm_vec[2]),
("d", self.d))
https://bitbucket.org/yt_analysis/yt/commits/cf774afe9ce8/
Changeset: cf774afe9ce8
Branch: yt
User: xarthisius
Date: 2015-08-06 21:20:37+00:00
Summary: Add reference
Affected #: 1 file
diff -r c965ddd1887ab5ffdee2b915a438ac915016a0a2 -r cf774afe9ce8161435c0167c5114c876319d0652 yt/geometry/selection_routines.pyx
--- a/yt/geometry/selection_routines.pyx
+++ b/yt/geometry/selection_routines.pyx
@@ -607,7 +607,8 @@
# http://www.eternallyconfuzzled.com/tuts/algorithms/jsw_tut_hashing.aspx
cdef np.int64_t hash_val = 0
for v in self._hash_vals() + self._base_hash():
- hash_val = (hash_val * 16777619) ^ hash(v) # FNV hash
+ # FNV hash cf. http://www.isthe.com/chongo/tech/comp/fnv/index.html
+ hash_val = (hash_val * 16777619) ^ hash(v)
return hash_val
def _hash_vals(self):
https://bitbucket.org/yt_analysis/yt/commits/d0f0f88e40e0/
Changeset: d0f0f88e40e0
Branch: yt
User: xarthisius
Date: 2015-08-06 21:26:36+00:00
Summary: Use 64-bit FNV prime
Affected #: 1 file
diff -r cf774afe9ce8161435c0167c5114c876319d0652 -r d0f0f88e40e08f1390d6f20874881b09cd6700a6 yt/geometry/selection_routines.pyx
--- a/yt/geometry/selection_routines.pyx
+++ b/yt/geometry/selection_routines.pyx
@@ -608,7 +608,7 @@
cdef np.int64_t hash_val = 0
for v in self._hash_vals() + self._base_hash():
# FNV hash cf. http://www.isthe.com/chongo/tech/comp/fnv/index.html
- hash_val = (hash_val * 16777619) ^ hash(v)
+ hash_val = (hash_val * 1099511628211) ^ hash(v)
return hash_val
def _hash_vals(self):
https://bitbucket.org/yt_analysis/yt/commits/c0e93f8d8c87/
Changeset: c0e93f8d8c87
Branch: yt
User: xarthisius
Date: 2015-08-06 22:34:45+00:00
Summary: Backed out changeset d0f0f88e40e0. OverflowError: Python int too large to
convert to C long
Affected #: 1 file
diff -r d0f0f88e40e08f1390d6f20874881b09cd6700a6 -r c0e93f8d8c8794ba3aa366d9c85b685522f60081 yt/geometry/selection_routines.pyx
--- a/yt/geometry/selection_routines.pyx
+++ b/yt/geometry/selection_routines.pyx
@@ -608,7 +608,7 @@
cdef np.int64_t hash_val = 0
for v in self._hash_vals() + self._base_hash():
# FNV hash cf. http://www.isthe.com/chongo/tech/comp/fnv/index.html
- hash_val = (hash_val * 1099511628211) ^ hash(v)
+ hash_val = (hash_val * 16777619) ^ hash(v)
return hash_val
def _hash_vals(self):
https://bitbucket.org/yt_analysis/yt/commits/1f2ea0bf4184/
Changeset: 1f2ea0bf4184
Branch: yt
User: jzuhone
Date: 2015-08-11 15:21:50+00:00
Summary: Merged in xarthisius/yt (pull request #1680)
Use stronger FNV algorithm instead of XOR for calculating selection hash
Affected #: 1 file
diff -r 87b696c1a0e3c58fd6719b1dfc973b82f1624c77 -r 1f2ea0bf41846f243b50558c5eb9828bf06a3da2 yt/geometry/selection_routines.pyx
--- a/yt/geometry/selection_routines.pyx
+++ b/yt/geometry/selection_routines.pyx
@@ -446,7 +446,7 @@
@cython.wraparound(False)
@cython.cdivision(True)
cdef int fill_mask_selector(self, np.float64_t left_edge[3],
- np.float64_t right_edge[3],
+ np.float64_t right_edge[3],
np.float64_t dds[3], int dim[3],
np.ndarray[np.uint8_t, ndim=3, cast=True] child_mask,
np.ndarray[np.uint8_t, ndim=3] mask,
@@ -603,9 +603,12 @@
return mask.view("bool")
def __hash__(self):
+ # https://bitbucket.org/yt_analysis/yt/issues/1052/field-access-tests-fail-under-python3
+ # http://www.eternallyconfuzzled.com/tuts/algorithms/jsw_tut_hashing.aspx
cdef np.int64_t hash_val = 0
for v in self._hash_vals() + self._base_hash():
- hash_val ^= hash(v)
+ # FNV hash cf. http://www.isthe.com/chongo/tech/comp/fnv/index.html
+ hash_val = (hash_val * 16777619) ^ hash(v)
return hash_val
def _hash_vals(self):
@@ -1107,7 +1110,7 @@
def _hash_vals(self):
return (("norm_vec[0]", self.norm_vec[0]),
- ("norm_vec[1]", self.norm_vec[1]),
+ ("norm_vec[1]", self.norm_vec[1]),
("norm_vec[2]", self.norm_vec[2]),
("d", self.d))
Repository URL: https://bitbucket.org/yt_analysis/yt/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
More information about the yt-svn
mailing list