Commit ee492217 authored by Martin Reinecke's avatar Martin Reinecke

more unsigned integer fixes

parent 0518b53a
...@@ -1142,7 +1142,7 @@ template<typename T> void apply_holo ...@@ -1142,7 +1142,7 @@ template<typename T> void apply_holo
{ {
complex<T> tmp(0); complex<T> tmp(0);
size_t cv=0; size_t cv=0;
for (;cv<supp-3; cv+=4) for (;cv+3<supp; cv+=4)
tmp += ptr[cv ]*kv[cv ] tmp += ptr[cv ]*kv[cv ]
+ptr[cv+1]*kv[cv+1] +ptr[cv+1]*kv[cv+1]
+ptr[cv+2]*kv[cv+2] +ptr[cv+2]*kv[cv+2]
...@@ -1162,7 +1162,7 @@ template<typename T> void apply_holo ...@@ -1162,7 +1162,7 @@ template<typename T> void apply_holo
{ {
complex<T> tmp(r*ku[cu]); complex<T> tmp(r*ku[cu]);
size_t cv=0; size_t cv=0;
for (;cv<supp-3; cv+=4) for (;cv+3<supp; cv+=4)
{ {
wptr[cv ] += tmp*kv[cv ]; wptr[cv ] += tmp*kv[cv ];
wptr[cv+1] += tmp*kv[cv+1]; wptr[cv+1] += tmp*kv[cv+1];
......
...@@ -244,7 +244,7 @@ def test_pickling(): ...@@ -244,7 +244,7 @@ def test_pickling():
@pmp("nydirty", (128, 250)) @pmp("nydirty", (128, 250))
@pmp("nrow", (1, 39)) @pmp("nrow", (1, 39))
@pmp("nchan", (1, 70)) @pmp("nchan", (1, 70))
@pmp("epsilon", (1e-2, 1e-7, 2e-13)) @pmp("epsilon", (1e-1, 1e-7, 2e-13))
@pmp("weight", (True, False)) @pmp("weight", (True, False))
def test_applyholo(nxdirty, nydirty, nrow, nchan, epsilon, weight): def test_applyholo(nxdirty, nydirty, nrow, nchan, epsilon, weight):
np.random.seed(42) np.random.seed(42)
...@@ -263,7 +263,7 @@ def test_applyholo(nxdirty, nydirty, nrow, nchan, epsilon, weight): ...@@ -263,7 +263,7 @@ def test_applyholo(nxdirty, nydirty, nrow, nchan, epsilon, weight):
@pmp("nydirty", (250,)) @pmp("nydirty", (250,))
@pmp("nrow", (10, 100)) @pmp("nrow", (10, 100))
@pmp("nchan", (1, 10)) @pmp("nchan", (1, 10))
@pmp("epsilon", (1e-2, 1e-7)) @pmp("epsilon", (1e-1, 1e-7))
@pmp("du", (-2, 0, 1, 4)) @pmp("du", (-2, 0, 1, 4))
@pmp("dv", (-1, 0, 1)) @pmp("dv", (-1, 0, 1))
@pmp("weight", (True, False)) @pmp("weight", (True, False))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment