Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
libcdi
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mpim-sw
libcdi
Commits
fdba1334
Commit
fdba1334
authored
7 years ago
by
Uwe Schulzweida
Browse files
Options
Downloads
Patches
Plain Diff
Change datatype of nmiss to size_t.
parent
da15206d
No related branches found
No related tags found
No related merge requests found
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
app/cdi.c
+1
-1
1 addition, 1 deletion
app/cdi.c
src/grb_read.c
+1
-1
1 addition, 1 deletion
src/grb_read.c
src/iterator_fallback.c
+2
-2
2 additions, 2 deletions
src/iterator_fallback.c
src/stream_cgribex.c
+2
-2
2 additions, 2 deletions
src/stream_cgribex.c
src/stream_write.c
+3
-3
3 additions, 3 deletions
src/stream_write.c
with
9 additions
and
9 deletions
app/cdi.c
+
1
−
1
View file @
fdba1334
...
...
@@ -921,7 +921,7 @@ int main(int argc, char *argv[])
printShortinfo
(
streamID1
,
vlistID1
,
Vardis
);
}
in
t
idum
;
size_
t
idum
;
int
tsID
=
0
;
if
(
Info
||
fname2
)
while
(
(
nrecs
=
streamInqTimestep
(
streamID1
,
tsID
))
>
0
)
...
...
This diff is collapsed.
Click to expand it.
src/grb_read.c
+
1
−
1
View file @
fdba1334
...
...
@@ -176,7 +176,7 @@ void grb_read_var(stream_t * streamptr, int varID, int memtype, void *data, size
double
missval
=
vlistInqVarMissval
(
vlistID
,
varID
);
in
t
imiss
;
size_
t
imiss
;
streamptr
->
tsteps
[
tsID
].
records
[
recID
].
zip
=
grbUnzipRecord
(
gribbuffer
,
&
recsize
);
...
...
This diff is collapsed.
Click to expand it.
src/iterator_fallback.c
+
2
−
2
View file @
fdba1334
...
...
@@ -378,7 +378,7 @@ char *cdiFallbackIterator_copyVariableName(CdiIterator *super)
void
cdiFallbackIterator_readField
(
CdiIterator
*
super
,
double
*
buffer
,
size_t
*
nmiss
)
{
CdiFallbackIterator
*
me
=
(
CdiFallbackIterator
*
)(
void
*
)
super
;
in
t
missingValues
=
0
;
size_
t
missingValues
=
0
;
streamReadVarSlice
(
me
->
streamId
,
me
->
curVariable
,
me
->
curLevel
,
buffer
,
&
missingValues
);
if
(
nmiss
)
*
nmiss
=
(
size_t
)
missingValues
;
}
...
...
@@ -386,7 +386,7 @@ void cdiFallbackIterator_readField(CdiIterator *super, double *buffer, size_t *n
void
cdiFallbackIterator_readFieldF
(
CdiIterator
*
super
,
float
*
buffer
,
size_t
*
nmiss
)
{
CdiFallbackIterator
*
me
=
(
CdiFallbackIterator
*
)(
void
*
)
super
;
in
t
missingValues
=
0
;
size_
t
missingValues
=
0
;
streamReadVarSliceF
(
me
->
streamId
,
me
->
curVariable
,
me
->
curLevel
,
buffer
,
&
missingValues
);
if
(
nmiss
)
*
nmiss
=
(
size_t
)
missingValues
;
}
...
...
This diff is collapsed.
Click to expand it.
src/stream_cgribex.c
+
2
−
2
View file @
fdba1334
...
...
@@ -1359,7 +1359,7 @@ int cgribexDecode(int memtype, void *gribbuffer, size_t gribsize, void *data, si
if
(
memtype
==
MEMTYPE_FLOAT
)
{
float
*
restrict
dataf
=
(
float
*
)
data
;
for
(
long
i
=
0
;
i
<
datasize
;
i
++
)
for
(
size_t
i
=
0
;
i
<
datasize
;
i
++
)
if
(
(
fabs
(
dataf
[
i
]
-
undef_pds
)
<
undef_eps
)
||
IS_EQUAL
(
dataf
[
i
],
FSEC3_MissVal
)
)
{
dataf
[
i
]
=
(
float
)
missval
;
(
*
nmiss
)
++
;
...
...
@@ -1368,7 +1368,7 @@ int cgribexDecode(int memtype, void *gribbuffer, size_t gribsize, void *data, si
else
{
double
*
restrict
datad
=
(
double
*
)
data
;
for
(
long
i
=
0
;
i
<
datasize
;
i
++
)
for
(
size_t
i
=
0
;
i
<
datasize
;
i
++
)
if
(
(
fabs
(
datad
[
i
]
-
undef_pds
)
<
undef_eps
)
||
IS_EQUAL
(
datad
[
i
],
FSEC3_MissVal
)
)
{
datad
[
i
]
=
missval
;
(
*
nmiss
)
++
;
...
...
This diff is collapsed.
Click to expand it.
src/stream_write.c
+
3
−
3
View file @
fdba1334
...
...
@@ -106,7 +106,7 @@ The values are converted to the external data type of the variable, if necessary
void
streamWriteVar
(
int
streamID
,
int
varID
,
const
double
*
data
,
size_t
nmiss
)
{
void
(
*
myCdiStreamWriteVar_
)(
int
streamID
,
int
varID
,
int
memtype
,
const
void
*
data
,
size_t
nmiss
)
=
(
void
(
*
)(
int
,
int
,
int
,
const
void
*
,
in
t
))
=
(
void
(
*
)(
int
,
int
,
int
,
const
void
*
,
size_
t
))
namespaceSwitchGet
(
NSSWITCH_STREAM_WRITE_VAR_
).
func
;
myCdiStreamWriteVar_
(
streamID
,
varID
,
MEMTYPE_DOUBLE
,
(
const
void
*
)
data
,
nmiss
);
...
...
@@ -131,7 +131,7 @@ The values are converted to the external data type of the variable, if necessary
void
streamWriteVarF
(
int
streamID
,
int
varID
,
const
float
*
data
,
size_t
nmiss
)
{
int
(
*
myCdiStreamWriteVar_
)(
int
streamID
,
int
varID
,
int
memtype
,
const
void
*
data
,
size_t
nmiss
)
=
(
int
(
*
)(
int
,
int
,
int
,
const
void
*
,
in
t
))
=
(
int
(
*
)(
int
,
int
,
int
,
const
void
*
,
size_
t
))
namespaceSwitchGet
(
NSSWITCH_STREAM_WRITE_VAR_
).
func
;
if
(
myCdiStreamWriteVar_
(
streamID
,
varID
,
MEMTYPE_FLOAT
,
(
const
void
*
)
data
,
nmiss
)
)
...
...
@@ -280,7 +280,7 @@ void streamWriteVarChunk(int streamID, int varID,
{
void
(
*
myCdiStreamWriteVarChunk_
)(
int
streamID
,
int
varID
,
int
memtype
,
const
int
rect
[][
2
],
const
void
*
data
,
size_t
nmiss
)
=
(
void
(
*
)(
int
,
int
,
int
,
const
int
[][
2
],
const
void
*
,
in
t
))
=
(
void
(
*
)(
int
,
int
,
int
,
const
int
[][
2
],
const
void
*
,
size_
t
))
namespaceSwitchGet
(
NSSWITCH_STREAM_WRITE_VAR_CHUNK_
).
func
;
myCdiStreamWriteVarChunk_
(
streamID
,
varID
,
MEMTYPE_DOUBLE
,
rect
,
data
,
nmiss
);
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment