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
5d1002e6
Commit
5d1002e6
authored
2 years ago
by
Uwe Schulzweida
Browse files
Options
Downloads
Patches
Plain Diff
Rename DecodeArgs to JobArgs
parent
b961608c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!42
Develop
,
!36
M214003/develop
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/grb_read.c
+7
-7
7 additions, 7 deletions
src/grb_read.c
with
7 additions
and
7 deletions
src/grb_read.c
+
7
−
7
View file @
5d1002e6
...
...
@@ -103,25 +103,25 @@ grib1_unzip_record(void *gribbuffer, size_t *gribsize)
return
zip
;
}
typedef
struct
Decode
Args
typedef
struct
Job
Args
{
int
recID
,
tsID
,
*
outZip
,
filetype
,
memtype
,
unreduced
;
void
*
cgribexp
,
*
gribbuffer
,
*
data
;
size_t
recsize
,
gridsize
,
nmiss
;
double
missval
;
}
Decode
Args
;
}
Job
Args
;
static
int
grb_decode_record
(
void
*
untypedArgs
)
{
Decode
Args
*
args
=
(
Decode
Args
*
)
untypedArgs
;
Job
Args
*
args
=
(
Job
Args
*
)
untypedArgs
;
*
args
->
outZip
=
grib1_unzip_record
(
args
->
gribbuffer
,
&
args
->
recsize
);
grb_decode
(
args
->
filetype
,
args
->
memtype
,
args
->
cgribexp
,
args
->
gribbuffer
,
args
->
recsize
,
args
->
data
,
args
->
gridsize
,
args
->
unreduced
,
&
args
->
nmiss
,
args
->
missval
);
return
0
;
}
static
Decode
Args
static
Job
Args
grb_read_raw_data
(
stream_t
*
streamptr
,
int
tsID
,
int
recID
,
int
memtype
,
void
*
gribbuffer
,
void
*
data
,
bool
resetFilePos
)
{
int
vlistID
=
streamptr
->
vlistID
;
...
...
@@ -160,7 +160,7 @@ grb_read_raw_data(stream_t *streamptr, int tsID, int recID, int memtype, void *g
if
(
!
resetFilePos
)
streamptr
->
numvals
+=
gridsize
;
}
return
(
Decode
Args
){
return
(
Job
Args
){
.
recID
=
recID
,
.
tsID
=
tsID
,
.
outZip
=
&
streamptr
->
tsteps
[
tsID
].
records
[
recID
].
zip
,
...
...
@@ -180,14 +180,14 @@ grb_read_raw_data(stream_t *streamptr, int tsID, int recID, int memtype, void *g
static
size_t
grb_read_and_decode_record
(
stream_t
*
streamptr
,
int
recID
,
int
memtype
,
void
*
data
,
bool
resetFilePos
)
{
Decode
Args
args
=
grb_read_raw_data
(
streamptr
,
streamptr
->
curTsID
,
recID
,
memtype
,
streamptr
->
record
->
buffer
,
data
,
resetFilePos
);
Job
Args
args
=
grb_read_raw_data
(
streamptr
,
streamptr
->
curTsID
,
recID
,
memtype
,
streamptr
->
record
->
buffer
,
data
,
resetFilePos
);
grb_decode_record
(
&
args
);
return
args
.
nmiss
;
}
typedef
struct
JobDescriptor
{
Decode
Args
args
;
Job
Args
args
;
AsyncJob
*
job
;
}
JobDescriptor
;
...
...
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