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
Thomas Jahns
yaxt
Commits
0f30f9bc
Commit
0f30f9bc
authored
Apr 23, 2020
by
Thomas Jahns
🤸
Browse files
Move data to text segment where possible.
parent
d65a73f0
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
tests/test_idxsection.c
View file @
0f30f9bc
This diff is collapsed.
Click to expand it.
tests/test_idxvec.c
View file @
0f30f9bc
...
...
@@ -494,19 +494,16 @@ int main(void) {
{
// check get_bounding_box
Xt_int
indices
[
2
]
=
{
21
,
42
};
static
const
Xt_int
indices
[
2
]
=
{
21
,
42
};
int
num_indices
=
2
;
Xt_idxlist
idxvec
=
xt_idxvec_new
(
indices
,
num_indices
);
enum
{
ndim
=
3
};
Xt_int
global_size
[
ndim
];
static
const
Xt_int
global_size
[
ndim
]
=
{
4
,
4
,
4
}
;
Xt_int
global_start_index
=
0
;
struct
Xt_bounds
bounds
[
ndim
];
for
(
unsigned
i
=
0
;
i
<
ndim
;
++
i
)
global_size
[
i
]
=
4
;
xt_idxlist_get_bounding_box
(
idxvec
,
ndim
,
global_size
,
global_start_index
,
bounds
);
...
...
@@ -527,18 +524,14 @@ int main(void) {
Xt_idxlist
idxvec
=
xt_idxvec_new
(
indices
,
num_indices
);
enum
{
ndim
=
3
};
Xt_int
global_size
[
ndim
];
static
const
Xt_int
global_size
[
ndim
]
=
{
5
,
4
,
3
}
;
Xt_int
global_start_index
=
1
;
struct
Xt_bounds
bounds
[
ndim
];
global_size
[
0
]
=
5
;
global_size
[
1
]
=
4
;
global_size
[
2
]
=
3
;
xt_idxlist_get_bounding_box
(
idxvec
,
ndim
,
global_size
,
global_start_index
,
bounds
);
Xt_int
ref_start
[
3
]
=
{
2
,
2
,
1
};
static
const
Xt_int
ref_start
[
3
]
=
{
2
,
2
,
1
};
bool
mismatch
=
false
;
for
(
size_t
i
=
0
;
i
<
ndim
;
++
i
)
...
...
@@ -551,19 +544,16 @@ int main(void) {
{
// check get_bounding_box
Xt_int
indices
[
1
]
=
{
-
1
};
static
const
Xt_int
indices
[
1
]
=
{
-
1
};
int
num_indices
=
0
;
Xt_idxlist
idxvec
=
xt_idxvec_new
(
indices
,
num_indices
);
unsigned
ndim
=
3
;
Xt_int
global_size
[
ndim
];
enum
{
ndim
=
3
}
;
static
const
Xt_int
global_size
[
ndim
]
=
{
4
,
4
,
4
}
;
Xt_int
global_start_index
=
0
;
struct
Xt_bounds
bounds
[
ndim
];
for
(
unsigned
i
=
0
;
i
<
ndim
;
++
i
)
global_size
[
i
]
=
4
;
xt_idxlist_get_bounding_box
(
idxvec
,
ndim
,
global_size
,
global_start_index
,
bounds
);
...
...
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