Commit 0f30f9bc authored by Thomas Jahns's avatar Thomas Jahns 🤸
Browse files

Move data to text segment where possible.

parent d65a73f0
This diff is collapsed.
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment