Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Simon Perkins
ducc
Commits
dde8c508
Commit
dde8c508
authored
Jan 13, 2020
by
Martin Reinecke
Browse files
tweaks
parent
c34b08c1
Changes
3
Show whitespace changes
Inline
Side-by-side
libsharp2/sharp.cc
View file @
dde8c508
...
@@ -610,7 +610,7 @@ MRUTIL_NOINLINE void sharp_job::execute()
...
@@ -610,7 +610,7 @@ MRUTIL_NOINLINE void sharp_job::execute()
vector
<
dcmplx
>
phasebuffer
;
vector
<
dcmplx
>
phasebuffer
;
//FIXME: needs to be changed to "nm"
//FIXME: needs to be changed to "nm"
alloc_phase
(
mmax
+
1
,
chunksize
,
phasebuffer
);
alloc_phase
(
mmax
+
1
,
chunksize
,
phasebuffer
);
std
::
atomic
<
unsigned
long
long
>
a_opcnt
=
0
;
std
::
atomic
<
unsigned
long
long
>
a_opcnt
(
0
)
;
/* chunk loop */
/* chunk loop */
for
(
int
chunk
=
0
;
chunk
<
nchunks
;
++
chunk
)
for
(
int
chunk
=
0
;
chunk
<
nchunks
;
++
chunk
)
...
...
mr_util/gl_integrator.h
View file @
dde8c508
...
@@ -39,7 +39,7 @@ class GL_Integrator
...
@@ -39,7 +39,7 @@ class GL_Integrator
vector
<
double
>
x
,
w
;
vector
<
double
>
x
,
w
;
static
inline
double
one_minus_x2
(
double
x
)
static
inline
double
one_minus_x2
(
double
x
)
{
return
(
abs
(
x
)
>
0.1
)
?
(
1.
+
x
)
*
(
1.
-
x
)
:
1.
-
x
*
x
;
}
{
return
(
std
::
abs
(
x
)
>
0.1
)
?
(
1.
+
x
)
*
(
1.
-
x
)
:
1.
-
x
*
x
;
}
public:
public:
GL_Integrator
(
int
n
,
size_t
nthreads
=
1
)
GL_Integrator
(
int
n
,
size_t
nthreads
=
1
)
...
@@ -86,7 +86,7 @@ class GL_Integrator
...
@@ -86,7 +86,7 @@ class GL_Integrator
x0
=
x1
;
x0
=
x1
;
if
(
dobreak
)
break
;
if
(
dobreak
)
break
;
if
(
abs
(
dx
)
<=
eps
)
dobreak
=
1
;
if
(
std
::
abs
(
dx
)
<=
eps
)
dobreak
=
1
;
MR_assert
(
++
j
<
100
,
"convergence problem"
);
MR_assert
(
++
j
<
100
,
"convergence problem"
);
}
}
...
@@ -132,6 +132,8 @@ class GL_Integrator
...
@@ -132,6 +132,8 @@ class GL_Integrator
}
}
return
res
;
return
res
;
}
}
const
vector
<
double
>
&
coordsSymmetric
()
const
{
return
x
;
}
vector
<
double
>
weights
()
const
vector
<
double
>
weights
()
const
{
{
...
@@ -140,6 +142,13 @@ class GL_Integrator
...
@@ -140,6 +142,13 @@ class GL_Integrator
res
[
i
]
=
res
[
n_
-
1
-
i
]
=
w
[
w
.
size
()
-
1
-
i
];
res
[
i
]
=
res
[
n_
-
1
-
i
]
=
w
[
w
.
size
()
-
1
-
i
];
return
res
;
return
res
;
}
}
vector
<
double
>
weightsSymmetric
()
const
{
auto
res
=
w
;
if
(
n_
&
1
)
res
[
0
]
*=
0.5
;
for
(
auto
&
v
:
res
)
v
*=
2
;
return
res
;
}
};
};
}
}
...
...
mr_util/mav.h
View file @
dde8c508
...
@@ -27,9 +27,7 @@
...
@@ -27,9 +27,7 @@
namespace
mr
{
namespace
mr
{
namespace
mav
{
namespace
detail_mav
{
namespace
detail
{
using
namespace
std
;
using
namespace
std
;
...
@@ -114,11 +112,11 @@ template<typename T, size_t ndim> const_mav<T, ndim> nullmav()
...
@@ -114,11 +112,11 @@ template<typename T, size_t ndim> const_mav<T, ndim> nullmav()
}
}
using
detail
::
mav
;
using
detail
_mav
::
mav
;
using
detail
::
const_mav
;
using
detail
_mav
::
const_mav
;
using
detail
::
cmav
;
using
detail
_mav
::
cmav
;
using
detail
::
nullmav
;
using
detail
_mav
::
nullmav
;
}
}
}
#endif
#endif
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment