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
5469ff06
Commit
5469ff06
authored
8 years ago
by
Thomas Jahns
Committed by
Sergey Kosukhin
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Optimize layout of var_t struct.
* xyz can only be one of 123, 132, 213, 231, 312, 321.
parent
043a523e
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/vlist.h
+3
-2
3 additions, 2 deletions
src/vlist.h
src/vlist_var.c
+2
-2
2 additions, 2 deletions
src/vlist_var.c
with
5 additions
and
4 deletions
src/vlist.h
+
3
−
2
View file @
5469ff06
...
...
@@ -46,6 +46,8 @@ typedef struct
{
bool
isUsed
;
bool
flag
;
short
xyz
;
/* order of spatial dimensions,
* a permutation of 123 */
int
mvarID
;
int
fvarID
;
int
param
;
...
...
@@ -58,8 +60,7 @@ typedef struct
int
modelID
;
int
tableID
;
int
timave
;
int
nsb
;
// Number of significant bits
int
xyz
;
int
nsb
;
// Number of significant bits
bool
missvalused
;
// true if missval is defined
bool
lvalidrange
;
double
missval
;
...
...
This diff is collapsed.
Click to expand it.
src/vlist_var.c
+
2
−
2
View file @
5469ff06
...
...
@@ -1327,7 +1327,7 @@ vlistInqVarNSB(int vlistID, int varID)
static
int
vlistEncodeXyz
(
const
int
dimorder
[
3
])
{
return
dimorder
[
0
]
*
100
+
dimorder
[
1
]
*
10
+
dimorder
[
2
];
return
(
short
)
(
dimorder
[
0
]
*
100
+
dimorder
[
1
]
*
10
+
dimorder
[
2
]
)
;
}
static
void
...
...
@@ -1376,7 +1376,7 @@ vlistDefVarXYZ(int vlistID, int varID, int xyz)
assert
(
xyz
==
123
||
xyz
==
312
||
xyz
==
231
||
xyz
==
321
||
xyz
==
132
||
xyz
==
213
);
vlistptr
->
vars
[
varID
].
xyz
=
xyz
;
vlistptr
->
vars
[
varID
].
xyz
=
(
short
)
xyz
;
reshSetStatus
(
vlistID
,
&
vlistOps
,
RESH_DESYNC_IN_USE
);
}
...
...
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