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
Oleksii Turkot
CrystFEL
Commits
6170796e
Commit
6170796e
authored
Feb 27, 2010
by
Thomas White
Browse files
Do powder pattern as double precision floating point
parent
6b345bb3
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/pattern_sim.c
View file @
6170796e
...
...
@@ -152,7 +152,7 @@ int main(int argc, char *argv[])
int
c
;
struct
image
image
;
struct
gpu_context
*
gctx
=
NULL
;
long
long
int
*
powder
;
double
*
powder
;
int
config_simdetails
=
0
;
int
config_nearbragg
=
0
;
int
config_randomquat
=
0
;
...
...
@@ -306,9 +306,10 @@ int main(int argc, char *argv[])
for
(
x
=
0
;
x
<
image
.
width
;
x
++
)
{
for
(
y
=
0
;
y
<
image
.
height
;
y
++
)
{
powder
[
x
+
w
*
y
]
+=
image
.
data
[
x
+
w
*
y
];
powder
[
x
+
w
*
y
]
+=
(
double
)
image
.
data
[
x
+
w
*
y
];
if
(
image
.
data
[
x
+
w
*
y
]
<
0
)
{
STATUS
(
"Negative! %f %i %i
\n
"
,
image
.
data
[
x
+
w
*
y
],
x
,
y
);
STATUS
(
"Negative! %f %i %i
\n
"
,
image
.
data
[
x
+
w
*
y
],
x
,
y
);
}
}
}
...
...
@@ -316,7 +317,7 @@ int main(int argc, char *argv[])
if
(
!
(
ndone
%
10
)
)
{
hdf5_write
(
"results/integr.h5"
,
powder
,
image
.
width
,
image
.
height
,
H5T_NATIVE_
LLONG
);
H5T_NATIVE_
DOUBLE
);
}
}
...
...
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