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