Commit 355c9d78 authored by Thomas Jahns's avatar Thomas Jahns 🤸
Browse files

Rename Xt_idx to Xt_int.

parent a4afeb07
......@@ -88,11 +88,11 @@ AS_IF([test x$MPI_LAUNCH = xtrue],
# 2^31 elements isn't enough or too much
AC_ARG_WITH([idxtype],
AS_HELP_STRING([--with-idxtype],[select type to use for global index values @<:@default=int@:>@]),
[XT_IDX=$withval
AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[[char a[((($XT_IDX)-1)<0)];
char b[($XT_IDX)((($XT_IDX)-1.5)+0.5)]]])],,
[XT_INT=$withval
AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[[char a[((($XT_INT)-1)<0)];
char b[($XT_INT)((($XT_INT)-1.5)+0.5)]]])],,
[AC_MSG_ERROR([Selected index type not compilable or unsigned])])],
[XT_IDX=int])
[XT_INT=int])
AC_ARG_WITH([counttype],
AS_HELP_STRING([--with-counttype],[select type to use for local index values @<:@default=int@:>@]),
[XT_COUNT=$withval
......@@ -100,7 +100,7 @@ AC_ARG_WITH([counttype],
char b[($XT_COUNT)((($XT_COUNT)-1.5)+0.5)]]])],,
[AC_MSG_ERROR([Selected index type not compilable or unsigned])])],
[XT_COUNT=int])
m4_foreach([substtype],[[XT_IDX],[XT_COUNT]],
m4_foreach([substtype],[[XT_INT],[XT_COUNT]],
[AS_CASE(["$substtype"],
[int],
substtype[_MPIDT=MPI_INT
......@@ -126,8 +126,8 @@ m4_foreach([substtype],[[XT_IDX],[XT_COUNT]],
FCFLAGS="$FCFLAGS ${FPP_DEFOPT}substtype[]_FC_KIND=$substtype[]_FC_KIND"
])
AC_DEFINE_UNQUOTED([XT_IDX],[$XT_IDX],[Type to use for enumeration of distributed elements.])
AC_DEFINE_UNQUOTED([XT_IDX_MPIDT],[$XT_IDX_MPIDT],[Type to use for enumeration of distributed elements.])
AC_DEFINE_UNQUOTED([XT_INT],[$XT_INT],[Type to use for enumeration of distributed elements.])
AC_DEFINE_UNQUOTED([XT_INT_MPIDT],[$XT_INT_MPIDT],[Type to use for enumeration of distributed elements.])
AC_DEFINE_UNQUOTED([XT_COUNT],[$XT_COUNT],[Type to use for enumeration of distributed elements.])
AC_DEFINE_UNQUOTED([XT_COUNT_MPIDT],[$XT_COUNT_MPIDT],[Type to use for enumeration of distributed elements.])
......
......@@ -53,7 +53,7 @@ int main(void) {
{
//! [index list example]
Xt_idx indices[] = {0,3,32,26,44,14,48};
Xt_int indices[] = {0,3,32,26,44,14,48};
Xt_count num_indices = sizeof(indices)/sizeof(indices[0]);
Xt_idxlist idxvec = xt_idxvec_new(indices, num_indices);
......@@ -81,7 +81,7 @@ int main(void) {
{
//! [index section example]
Xt_idx start = 0;
Xt_int start = 0;
unsigned num_dimensions = 2;
unsigned global_size[2] = {5,10};
unsigned local_size[2] = {3,4};
......@@ -100,7 +100,7 @@ int main(void) {
{
//! [index list collection example]
Xt_idx start = 0;
Xt_int start = 0;
unsigned num_dimensions = 2;
unsigned global_size[2] = {5,10};
unsigned local_size[2][2] = {{2,2},{3,4}};
......@@ -127,7 +127,7 @@ int main(void) {
{
//![index list modifier example]
Xt_idx start = 0;
Xt_int start = 0;
unsigned num_dimensions = 2;
unsigned global_size[2] = {5,10};
unsigned local_size[2] = {3,3};
......@@ -168,7 +168,7 @@ static void print_index_list(Xt_idxlist idxlist) {
for (Xt_count i = 0; i < xt_idxlist_get_num_indices(idxlist); ++i) {
Xt_idx index;
Xt_int index;
xt_idxlist_get_index_at_position(idxlist, i, &index);
printf("%d ", index);
......
......@@ -71,7 +71,7 @@ struct config {
void print_index(Xt_idxlist idxsection, int rank, int i){
#ifdef DEBUG
for (int p = 0; p < xt_idxlist_get_num_indices(idxsection); p ++){
Xt_idx value;
Xt_int value;
xt_idxlist_get_index_at_position (idxsection, p, &value);
if (i == 0)
......@@ -149,7 +149,7 @@ void init_data_with_index_list(int *data_array, int array_leng,
#ifdef CHECK_RESULTS
for (int i = 0; i < array_leng; ++i) {
Xt_idx index;
Xt_int index;
xt_idxlist_get_index_at_position(idxlist, i, &index);
data_array[i] = index;
}
......@@ -171,7 +171,7 @@ int check_data_against_index_list(int *data_array, int array_leng,
for (int i = 0; i < array_leng; ++i) {
Xt_idx index;
Xt_int index;
xt_idxlist_get_index_at_position(idxlist, i, &index);
if (data_array[i] != index) {
......@@ -312,7 +312,7 @@ int main(int argc, char** argv) {
// -- SOURCE index list by section
Xt_idxlist src_idxsection;
Xt_idx start = 0;
Xt_int start = 0;
//create source index section
src_idxsection = xt_idxsection_new(start, num_dims, global_size,
......
......@@ -49,7 +49,7 @@
#include "xt/mergesort.h"
static void insertionsort_idxpos(idxpos_type *w, int n);
static void insertionsort_index(Xt_idx *val, int n, int *pos, int reset_pos);
static void insertionsort_index(Xt_int *val, int n, int *pos, int reset_pos);
static void insertionsort_idxpos(idxpos_type *w, int n) {
......@@ -66,7 +66,7 @@ static void insertionsort_idxpos(idxpos_type *w, int n) {
}
}
static void insertionsort_index(Xt_idx *val, int n, int *pos, int reset_pos) {
static void insertionsort_index(Xt_int *val, int n, int *pos, int reset_pos) {
int i, j;
......@@ -80,7 +80,7 @@ static void insertionsort_index(Xt_idx *val, int n, int *pos, int reset_pos) {
for(i = 1; i < n; i++) {
Xt_idx tv = val[i];
Xt_int tv = val[i];
int tp = pos[i];
for(j = i; j > 0 && val[j-1] > tv; j--) {
......@@ -96,7 +96,7 @@ static void insertionsort_index(Xt_idx *val, int n, int *pos, int reset_pos) {
for(i = 1; i < n; i++) {
Xt_idx tv = val[i];
Xt_int tv = val[i];
for(j = i; j > 0 && val[j-1] > tv; j--) {
val[j] = val[j-1];
......@@ -188,7 +188,7 @@ void xt_mergesort_idxpos(idxpos_type * restrict v, int n)
}
void xt_mergesort_index(Xt_idx *val, int n, int *pos, int reset_pos) {
void xt_mergesort_index(Xt_int *val, int n, int *pos, int reset_pos) {
// insertion sort for few elements:
if (n<9) {
......
......@@ -173,7 +173,7 @@ void xt_quicksort_idxpos(idxpos_type *v, int n) {
free(stackr);
}
void xt_quicksort_index(Xt_idx * v_idx, int n, int * v_pos, int reset_pos) {
void xt_quicksort_index(Xt_int * v_idx, int n, int * v_pos, int reset_pos) {
int pointer_inc = 64;
int pointer_size;
......@@ -182,7 +182,7 @@ void xt_quicksort_index(Xt_idx * v_idx, int n, int * v_pos, int reset_pos) {
int * stackr;
int i, j, k, l, r, s;
Xt_idx w_idx, x_idx;
Xt_int w_idx, x_idx;
int w_pos, x_pos;
/* Initialization */
......
......@@ -59,6 +59,6 @@ void xt_mergesort_idxpos(idxpos_type *v, int n);
* @param[in,out] idx old index of sorted returned a
* @param[in] reset_index override given idx by identity idx
*/
void xt_mergesort_index (Xt_idx * a, int n, int * idx, int reset_index);
void xt_mergesort_index (Xt_int * a, int n, int * idx, int reset_index);
#endif
......@@ -65,6 +65,6 @@ void xt_quicksort_idxpos(idxpos_type *v, int n);
* @param[in,out] idx old index of sorted returned a
* @param[in] reset_index override given idx by identity idx
*/
void xt_quicksort_index (Xt_idx * a, int n, int * idx, int reset_index);
void xt_quicksort_index (Xt_int * a, int n, int * idx, int reset_index);
#endif
......@@ -48,7 +48,7 @@
#include "xt/xt_core.h"
typedef struct idxpos_struct {
Xt_idx idx;
Xt_int idx;
int pos;
} idxpos_type;
......
......@@ -52,8 +52,8 @@
* Distributed elements are enumerated with numbers of this signed
* integral type.
*/
typedef XT_IDX Xt_idx;
#define Xt_idx_dt (XT_IDX_MPIDT)
typedef XT_INT Xt_int;
#define Xt_int_dt (XT_INT_MPIDT)
/**
* Local elements are addressed with numbers of this signed
* integral type.
......
......@@ -52,9 +52,9 @@
#include "xt/xt_core.h"
struct Xt_stripe {
Xt_idx start;
Xt_int start;
Xt_count nstrides;
Xt_idx stride;
Xt_int stride;
};
struct xt_idxlist_vtable {
......@@ -66,18 +66,18 @@ struct xt_idxlist_vtable {
Xt_idxlist (*get_intersection)(Xt_idxlist,Xt_idxlist);
Xt_idxlist (*copy)(Xt_idxlist);
Xt_count (*get_num_indices)(Xt_idxlist);
void (*get_indices)(Xt_idxlist, Xt_idx *indices);
Xt_idx const * (*get_indices_const)(Xt_idxlist idxlist);
void (*get_indices)(Xt_idxlist, Xt_int *indices);
Xt_int const * (*get_indices_const)(Xt_idxlist idxlist);
void (*get_index_stripes)(Xt_idxlist, struct Xt_stripe **, Xt_count *);
int (*get_index_at_position)(Xt_idxlist, int, Xt_idx *);
int (*get_indices_at_positions)(Xt_idxlist idxlist, int *positions, Xt_count num, Xt_idx *index, Xt_idx undef_idx);
int (*get_position_of_index)(Xt_idxlist, Xt_idx, int *);
int (*get_positions_of_indices)(Xt_idxlist, Xt_idx const *, Xt_count, int *, int);
int (*get_position_of_index_off)(Xt_idxlist, Xt_idx, int *, int);
int (*get_positions_of_indices_off)(Xt_idxlist, Xt_idx const *, Xt_count,
int (*get_index_at_position)(Xt_idxlist, int, Xt_int *);
int (*get_indices_at_positions)(Xt_idxlist idxlist, int *positions, Xt_count num, Xt_int *index, Xt_int undef_idx);
int (*get_position_of_index)(Xt_idxlist, Xt_int, int *);
int (*get_positions_of_indices)(Xt_idxlist, Xt_int const *, Xt_count, int *, int);
int (*get_position_of_index_off)(Xt_idxlist, Xt_int, int *, int);
int (*get_positions_of_indices_off)(Xt_idxlist, Xt_int const *, Xt_count,
int *, int *);
Xt_idx (*get_min_index)(Xt_idxlist);
Xt_idx (*get_max_index)(Xt_idxlist);
Xt_int (*get_min_index)(Xt_idxlist);
Xt_int (*get_max_index)(Xt_idxlist);
};
enum xt_idxvecype {
......@@ -198,9 +198,9 @@ Xt_count xt_idxlist_get_num_indices(Xt_idxlist idxlist);
* @param[in] idxlist index list for which the indices are to be returned
* @param[in,out] indices array into which the indices are written
*/
void xt_idxlist_get_indices(Xt_idxlist idxlist, Xt_idx *indices);
void xt_idxlist_get_indices(Xt_idxlist idxlist, Xt_int *indices);
Xt_idx const * xt_idxlist_get_indices_const(Xt_idxlist idxlist);
Xt_int const * xt_idxlist_get_indices_const(Xt_idxlist idxlist);
/**
* gets a pointer of the constant indices stored in an index list
......@@ -208,7 +208,7 @@ Xt_idx const * xt_idxlist_get_indices_const(Xt_idxlist idxlist);
* @param[in] idxlist index list for which the indices are to be returned
* @return const indices array
*/
Xt_idx const * xt_idxlist_get_indices_const(Xt_idxlist idxlist);
Xt_int const * xt_idxlist_get_indices_const(Xt_idxlist idxlist);
/**
* returns the indices stored in an index list
......@@ -232,7 +232,7 @@ void xt_idxlist_get_index_stripes(Xt_idxlist idxlist,
* @return 0 if everything was okay\n
* 1 if the position is out of range
*/
int xt_idxlist_get_index_at_position(Xt_idxlist idxlist, int position, Xt_idx * index);
int xt_idxlist_get_index_at_position(Xt_idxlist idxlist, int position, Xt_int * index);
/**
* get indices stored at the specified positions in an index list
......@@ -245,7 +245,7 @@ int xt_idxlist_get_index_at_position(Xt_idxlist idxlist, int position, Xt_idx *
* @return zero if everything was okay or\n
* number of unresolved positions ( == number of undef values assigned to the result)
*/
int xt_idxlist_get_indices_at_positions(Xt_idxlist idxlist, int *positions, Xt_count num_pos, Xt_idx *indices, Xt_idx undef_idx);
int xt_idxlist_get_indices_at_positions(Xt_idxlist idxlist, int *positions, Xt_count num_pos, Xt_int *indices, Xt_int undef_idx);
/**
* gets the position of the first occurrence of the given index
......@@ -258,7 +258,7 @@ int xt_idxlist_get_indices_at_positions(Xt_idxlist idxlist, int *positions, Xt_c
* @return 0 if everything was okay
* 1 if the index could not be found in idxlist
*/
int xt_idxlist_get_position_of_index(Xt_idxlist idxlist, Xt_idx index, int * position);
int xt_idxlist_get_position_of_index(Xt_idxlist idxlist, Xt_int index, int * position);
/**
* gets the positions of the first occurrence of the given indices
......@@ -275,7 +275,7 @@ int xt_idxlist_get_position_of_index(Xt_idxlist idxlist, Xt_idx index, int * pos
* @return 0 if everything was okay
* 1 if the index could not be found in idxlist
*/
int xt_idxlist_get_positions_of_indices(Xt_idxlist idxlist, Xt_idx const * indices,
int xt_idxlist_get_positions_of_indices(Xt_idxlist idxlist, Xt_int const * indices,
Xt_count num_indices, int * positions,
int single_match_only);
......@@ -292,7 +292,7 @@ int xt_idxlist_get_positions_of_indices(Xt_idxlist idxlist, Xt_idx const * indic
* @return 0 if everything was okay
* 1 if the index could not be found in idxlist
*/
int xt_idxlist_get_position_of_index_off(Xt_idxlist idxlist, Xt_idx index,
int xt_idxlist_get_position_of_index_off(Xt_idxlist idxlist, Xt_int index,
int * position, int offset);
/**
......@@ -312,7 +312,7 @@ int xt_idxlist_get_position_of_index_off(Xt_idxlist idxlist, Xt_idx index,
* \remarks a call to xt_idxlist_get_position_of_index_off with offset = NULL
* is the same as a call to xt_idxlist_get_positions_of_indices
*/
int xt_idxlist_get_positions_of_indices_off(Xt_idxlist idxlist, Xt_idx const * indices,
int xt_idxlist_get_positions_of_indices_off(Xt_idxlist idxlist, Xt_int const * indices,
Xt_count num_indices, int * positions,
int * offsets);
......@@ -322,7 +322,7 @@ int xt_idxlist_get_positions_of_indices_off(Xt_idxlist idxlist, Xt_idx const * i
* @param[in] idxlist index list
* @return smallest index in idxlist
*/
Xt_idx xt_idxlist_get_min_index(Xt_idxlist idxlist);
Xt_int xt_idxlist_get_min_index(Xt_idxlist idxlist);
/**
* gets the biggest index stored in the index list
......@@ -330,6 +330,6 @@ Xt_idx xt_idxlist_get_min_index(Xt_idxlist idxlist);
* @param[in] idxlist index list
* @return biggest index in idxlist
*/
Xt_idx xt_idxlist_get_max_index(Xt_idxlist idxlist);
Xt_int xt_idxlist_get_max_index(Xt_idxlist idxlist);
#endif // XT_IDXLIST_H
......@@ -62,9 +62,10 @@
* within the global array for each dimension (C-style)
*
*/
Xt_idxlist xt_idxsection_new(Xt_idx start, unsigned num_dimensions,
unsigned * global_size, unsigned * local_size,
unsigned * local_start);
Xt_idxlist xt_idxsection_new(Xt_int start, unsigned num_dimensions,
unsigned global_size[num_dimensions],
unsigned local_size[num_dimensions],
unsigned local_start[num_dimensions]);
Xt_idxlist xt_idxsection_unpack(void *buffer, int buffer_size, int *position,
MPI_Comm comm);
......
......@@ -75,7 +75,7 @@ Xt_idxlist xt_idxstripes_unpack(void *buffer, int buffer_size, int *position,
* for freeing the memory associated with the stripes)
* @param[out] num_stripes number of stripes in array "stripes"
*/
void xt_idxstripes_convert_to_stripes(Xt_idx const * indices,
void xt_idxstripes_convert_to_stripes(Xt_int const * indices,
Xt_count num_indices,
struct Xt_stripe ** stripes,
Xt_count * num_stripes);
......
......@@ -61,7 +61,7 @@
* @param[in] num_indices number of indices in idxlist
* @return returns a Xt_idxlist
*/
Xt_idxlist xt_idxvec_new(Xt_idx *idxlist, Xt_count num_indices);
Xt_idxlist xt_idxvec_new(Xt_int *idxlist, Xt_count num_indices);
Xt_idxlist
xt_idxvec_from_stripes_new(struct Xt_stripe * stripes, Xt_count num_stripes);
......
......@@ -54,7 +54,7 @@
/** \example test_sort.c
*/
extern void (*xt_sort_index)(Xt_idx * a, int n, int * idx, int reset_index);
extern void (*xt_sort_index)(Xt_int * a, int n, int * idx, int reset_index);
extern void (*xt_sort_idxpos)(idxpos_type *v, int n);
#endif // XT_SORT_H
......@@ -121,7 +121,7 @@ Xt_idxlist xt_idxlist_get_intersection(Xt_idxlist idxlist_src,
num_indices_src = xt_idxlist_get_num_indices(idxlist_src);
num_indices_dst = xt_idxlist_get_num_indices(idxlist_dst);
Xt_idx *indices_src, *indices_dst;
Xt_int *indices_src, *indices_dst;
indices_src = xmalloc(num_indices_src * sizeof (indices_src[0]));
indices_dst = xmalloc(num_indices_dst * sizeof (indices_dst[0]));
......@@ -154,13 +154,13 @@ Xt_count xt_idxlist_get_num_indices(Xt_idxlist idxlist) {
return idxlist->vtable->get_num_indices(idxlist);
}
void xt_idxlist_get_indices(Xt_idxlist idxlist, Xt_idx *indices) {
void xt_idxlist_get_indices(Xt_idxlist idxlist, Xt_int *indices) {
idxlist->vtable->get_indices(idxlist, indices);
}
const Xt_idx *xt_idxlist_get_indices_const(Xt_idxlist idxlist) {
const Xt_int *xt_idxlist_get_indices_const(Xt_idxlist idxlist) {
if (idxlist->vtable->get_indices != NULL)
return idxlist->vtable->get_indices_const (idxlist);
......@@ -183,7 +183,7 @@ void xt_idxlist_get_index_stripes(Xt_idxlist idxlist,
Xt_count num_indices = xt_idxlist_get_num_indices(idxlist);
Xt_idx *indices = xmalloc(num_indices * sizeof (indices[0]));
Xt_int *indices = xmalloc(num_indices * sizeof (indices[0]));
xt_idxlist_get_indices(idxlist, indices);
......@@ -195,15 +195,15 @@ void xt_idxlist_get_index_stripes(Xt_idxlist idxlist,
}
int xt_idxlist_get_index_at_position(Xt_idxlist idxlist, int position,
Xt_idx * index) {
Xt_int * index) {
return idxlist->vtable->get_index_at_position(idxlist, position, index);
}
int
xt_idxlist_get_indices_at_positions(Xt_idxlist idxlist, int *positions,
Xt_count num_pos, Xt_idx *indices,
Xt_idx undef_idx) {
Xt_count num_pos, Xt_int *indices,
Xt_int undef_idx) {
if ( idxlist->vtable->get_indices_at_positions ) {
......@@ -227,14 +227,14 @@ xt_idxlist_get_indices_at_positions(Xt_idxlist idxlist, int *positions,
}
}
int xt_idxlist_get_position_of_index(Xt_idxlist idxlist, Xt_idx index,
int xt_idxlist_get_position_of_index(Xt_idxlist idxlist, Xt_int index,
int * position) {
return idxlist->vtable->get_position_of_index(idxlist, index, position);
}
int
xt_idxlist_get_positions_of_indices(Xt_idxlist idxlist, Xt_idx const * indices,
xt_idxlist_get_positions_of_indices(Xt_idxlist idxlist, Xt_int const * indices,
Xt_count num_indices, int * positions,
int single_match_only) {
......@@ -246,7 +246,7 @@ xt_idxlist_get_positions_of_indices(Xt_idxlist idxlist, Xt_idx const * indices,
else {
Xt_count num_tmp_indices;
num_tmp_indices = xt_idxlist_get_num_indices(idxlist);
Xt_idx *tmp_indices;
Xt_int *tmp_indices;
tmp_indices = xmalloc(num_tmp_indices * sizeof (tmp_indices[0]));
xt_idxlist_get_indices(idxlist, tmp_indices);
Xt_idxlist tmp_idxvec;
......@@ -261,7 +261,7 @@ xt_idxlist_get_positions_of_indices(Xt_idxlist idxlist, Xt_idx const * indices,
}
}
int xt_idxlist_get_position_of_index_off(Xt_idxlist idxlist, Xt_idx index,
int xt_idxlist_get_position_of_index_off(Xt_idxlist idxlist, Xt_int index,
int * position, int offset) {
return idxlist->vtable->get_position_of_index_off(idxlist, index,
......@@ -270,7 +270,7 @@ int xt_idxlist_get_position_of_index_off(Xt_idxlist idxlist, Xt_idx index,
int
xt_idxlist_get_positions_of_indices_off(Xt_idxlist idxlist,
const Xt_idx *indices,
const Xt_int *indices,
Xt_count num_indices, int * positions,
int * offsets) {
......@@ -303,12 +303,12 @@ xt_idxlist_get_positions_of_indices_off(Xt_idxlist idxlist,
return 0;
}
Xt_idx xt_idxlist_get_min_index(Xt_idxlist idxlist) {
Xt_int xt_idxlist_get_min_index(Xt_idxlist idxlist) {
return idxlist->vtable->get_min_index(idxlist);
}
Xt_idx xt_idxlist_get_max_index(Xt_idxlist idxlist) {
Xt_int xt_idxlist_get_max_index(Xt_idxlist idxlist) {
return idxlist->vtable->get_max_index(idxlist);
}
......@@ -81,9 +81,9 @@ static Xt_count
idxlist_collection_get_num_indices(Xt_idxlist idxlist);
static void
idxlist_collection_get_indices(Xt_idxlist idxlist, Xt_idx *indices);
idxlist_collection_get_indices(Xt_idxlist idxlist, Xt_int *indices);
static const Xt_idx *
static const Xt_int *
idxlist_collection_get_indices_const(Xt_idxlist idxlist);
static void
......@@ -93,20 +93,20 @@ idxlist_collection_get_index_stripes(Xt_idxlist idxlist,
static int
idxlist_collection_get_index_at_position(Xt_idxlist idxlist, int position,
Xt_idx * index);
Xt_int * index);
static int
idxlist_collection_get_position_of_index(Xt_idxlist idxlist, Xt_idx index,
idxlist_collection_get_position_of_index(Xt_idxlist idxlist, Xt_int index,
int * position);
static int
idxlist_collection_get_position_of_index_off(Xt_idxlist idxlist, Xt_idx index,
idxlist_collection_get_position_of_index_off(Xt_idxlist idxlist, Xt_int index,
int * position, int offset);
static Xt_idx
static Xt_int
idxlist_collection_get_min_index(Xt_idxlist idxlist);
static Xt_idx
static Xt_int
idxlist_collection_get_max_index(Xt_idxlist idxlist);
static const struct xt_idxlist_vtable idxlist_collection_vtable = {
......@@ -137,7 +137,7 @@ struct xt_idxlist_collection {
unsigned num_idxlists;
Xt_count index_num_cache;
Xt_idx *index_array_cache;
Xt_int *index_array_cache;
};
Xt_idxlist
......@@ -285,7 +285,7 @@ idxlist_collection_get_num_indices(Xt_idxlist idxlist) {
}
static void
idxlist_collection_get_indices(Xt_idxlist idxlist, Xt_idx *indices) {
idxlist_collection_get_indices(Xt_idxlist idxlist, Xt_int *indices) {
struct xt_idxlist_collection *collectionlist
= (struct xt_idxlist_collection*)idxlist;
......@@ -300,7 +300,7 @@ idxlist_collection_get_indices(Xt_idxlist idxlist, Xt_idx *indices) {
}
}
static const Xt_idx *
static const Xt_int *
idxlist_collection_get_indices_const(Xt_idxlist idxlist) {
struct xt_idxlist_collection *collection
......@@ -310,7 +310,7 @@ idxlist_collection_get_indices_const(Xt_idxlist idxlist) {
Xt_count index_num = idxlist_collection_get_num_indices(idxlist);
Xt_idx *tmp_index_array
Xt_int *tmp_index_array
= xmalloc(index_num * sizeof( *(collection->index_array_cache) ) );
idxlist_collection_get_indices(idxlist, tmp_index_array);
......@@ -366,7 +366,7 @@ idxlist_collection_get_index_stripes(Xt_idxlist idxlist,
static int
idxlist_collection_get_index_at_position(Xt_idxlist idxlist, int position,
Xt_idx * index) {
Xt_int * index) {
struct xt_idxlist_collection *collectionlist
= (struct xt_idxlist_collection*)idxlist;
......@@ -385,7 +385,7 @@ idxlist_collection_get_index_at_position(Xt_idxlist idxlist, int position,
}
static int
idxlist_collection_get_position_of_index_off(Xt_idxlist idxlist, Xt_idx index,
idxlist_collection_get_position_of_index_off(Xt_idxlist idxlist, Xt_int index,
int * position, int offset) {
struct xt_idxlist_collection *collectionlist
......@@ -424,20 +424,20 @@ idxlist_collection_get_position_of_index_off(Xt_idxlist idxlist, Xt_idx index,
}
static int
idxlist_collection_get_position_of_index(Xt_idxlist idxlist, Xt_idx index,
idxlist_collection_get_position_of_index(Xt_idxlist idxlist, Xt_int index,
int * position) {
return idxlist_collection_get_position_of_index_off(idxlist, index,
position, 0);
}
static Xt_idx
static Xt_int
idxlist_collection_get_min_index(Xt_idxlist idxlist) {
struct xt_idxlist_collection *collectionlist
= (struct xt_idxlist_collection*)idxlist;
Xt_idx tmp_min, min = 0;
Xt_int tmp_min, min = 0;
if (collectionlist->num_idxlists == 0)
die("idxlist_collection_get_min_index empty collection");
......@@ -451,13 +451,13 @@ idxlist_collection_get_min_index(Xt_idxlist idxlist) {
return min;
}
static Xt_idx
static Xt_int
idxlist_collection_get_max_index(Xt_idxlist idxlist) {
struct xt_idxlist_collection *collectionlist
= (struct xt_idxlist_collection*)idxlist;
Xt_idx tmp_max, max = 0;
Xt_int tmp_max, max = 0;
if (collectionlist->num_idxlists == 0)
die("idxlist_collection_get_max_index empty collection");
......