Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mpim-sw
libcdi
Commits
578bd753
Commit
578bd753
authored
Nov 19, 2013
by
Thomas Jahns
🤸
Browse files
Make function xsum inline.
parent
1a701c17
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/pio_interface.c
View file @
578bd753
...
...
@@ -271,7 +271,7 @@ varsMapNDeco(int nNodes, int *nodeSizes)
for
(
i
=
0
;
i
<
nStreams
;
i
++
)
streamSizes
[
i
]
=
streamInqNvars
(
*
(
resHs
+
i
));
nVars
=
x
sum
(
nStreams
,
streamSizes
);
nVars
=
sum
_int
(
nStreams
,
streamSizes
);
varSizes
=
xmalloc
(
nVars
*
sizeof
(
varSizes
[
0
]
));
varMapping
=
xmalloc
(
nVars
*
sizeof
(
varMapping
[
0
]
));
...
...
src/pio_util.c
View file @
578bd753
...
...
@@ -193,21 +193,6 @@ void pcdiDebugMsg2 ( const char *filename, const char *functionname, int line,
/****************************************************/
int
xsum
(
int
n
,
int
*
argarray
)
{
int
i
,
sum
=
0
;
for
(
i
=
0
;
i
<
n
;
i
++
)
sum
+=
*
(
argarray
+
i
);
return
sum
;
}
/****************************************************/
double
xchecksum
(
int
type
,
int
count
,
void
*
buffer
)
{
return
0
.
0
;
...
...
src/pio_util.h
View file @
578bd753
...
...
@@ -140,7 +140,15 @@ void pcdiDebugMsg2 ( const char *filename, const char *functionname, int line, \
#define xdebugMsg2(tag,source,text) \
if ( ddebug ) pcdiDebugMsg ( __FILE__, __func__, __LINE__, tag, source, text )
int
xsum
(
int
,
int
*
);
static
inline
int
sum_int
(
size_t
n
,
int
*
a
)
{
int
sum
=
0
;
for
(
size_t
i
=
0
;
i
<
n
;
++
i
)
sum
+=
a
[
i
];
return
sum
;
}
double
xchecksum
(
int
,
int
,
void
*
);
...
...
Write
Preview
Markdown
is supported
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