Browse Source

fix type for node to always be unsigned (instead of uint32_t)

Nathalie Furmento 12 years ago
parent
commit
c7321a76ff
40 changed files with 213 additions and 213 deletions
  1. 9 9
      doc/chapters/advanced-api.texi
  2. 14 14
      doc/chapters/basic-api.texi
  3. 2 2
      doc/chapters/mpi-support.texi
  4. 9 9
      examples/filters/custom_mf/custom_interface.c
  5. 1 1
      examples/filters/custom_mf/custom_interface.h
  6. 8 8
      examples/interface/complex_interface.c
  7. 2 2
      examples/interface/complex_interface.h
  8. 1 1
      gcc-plugin/tests/mocks.h
  9. 3 3
      include/starpu_data.h
  10. 2 2
      include/starpu_data_filters.h
  11. 18 18
      include/starpu_data_interfaces.h
  12. 2 2
      include/starpu_scheduler.h
  13. 2 2
      src/core/perfmodel/perfmodel.c
  14. 11 11
      src/datawizard/coherency.c
  15. 4 4
      src/datawizard/coherency.h
  16. 11 11
      src/datawizard/data_request.c
  17. 9 9
      src/datawizard/data_request.h
  18. 2 2
      src/datawizard/datawizard.h
  19. 1 1
      src/datawizard/filters.c
  20. 7 7
      src/datawizard/interfaces/bcsr_interface.c
  21. 9 9
      src/datawizard/interfaces/block_interface.c
  22. 4 4
      src/datawizard/interfaces/coo_interface.c
  23. 7 7
      src/datawizard/interfaces/csr_interface.c
  24. 3 3
      src/datawizard/interfaces/data_interface.c
  25. 9 9
      src/datawizard/interfaces/matrix_interface.c
  26. 9 9
      src/datawizard/interfaces/multiformat_interface.c
  27. 9 9
      src/datawizard/interfaces/variable_interface.c
  28. 9 9
      src/datawizard/interfaces/vector_interface.c
  29. 6 6
      src/datawizard/interfaces/void_interface.c
  30. 10 10
      src/datawizard/memalloc.c
  31. 2 2
      src/datawizard/memalloc.h
  32. 2 2
      src/datawizard/memory_nodes.c
  33. 2 2
      src/datawizard/progress.c
  34. 1 1
      src/datawizard/reduction.c
  35. 1 1
      src/datawizard/user_interactions.c
  36. 3 3
      src/datawizard/write_back.c
  37. 2 2
      src/datawizard/write_back.h
  38. 2 2
      src/drivers/gordon/driver_gordon.c
  39. 2 2
      src/sched_policies/deque_modeling_policy_data_aware.c
  40. 3 3
      tests/microbenchs/local_pingpong.c

+ 9 - 9
doc/chapters/advanced-api.texi

@@ -287,19 +287,19 @@ The function does nothing if the cache mechanism is disabled (@pxref{STARPU_MPI_
 Per-interface data transfer methods.
 
 @table @asis
-@item @code{void (*register_data_handle)(starpu_data_handle_t handle, uint32_t home_node, void *data_interface)}
+@item @code{void (*register_data_handle)(starpu_data_handle_t handle, unsigned home_node, void *data_interface)}
 Register an existing interface into a data handle.
 
-@item @code{starpu_ssize_t (*allocate_data_on_node)(void *data_interface, uint32_t node)}
+@item @code{starpu_ssize_t (*allocate_data_on_node)(void *data_interface, unsigned node)}
 Allocate data for the interface on a given node.
 
-@item @code{ void (*free_data_on_node)(void *data_interface, uint32_t node)}
+@item @code{ void (*free_data_on_node)(void *data_interface, unsigned node)}
 Free data of the interface on a given node.
 
 @item @code{ const struct starpu_data_copy_methods *copy_methods}
 ram/cuda/opencl synchronous and asynchronous transfer methods.
 
-@item @code{ void * (*handle_to_pointer)(starpu_data_handle_t handle, uint32_t node)}
+@item @code{ void * (*handle_to_pointer)(starpu_data_handle_t handle, unsigned node)}
 Return the current pointer (if any) for the handle on the given node.
 
 @item @code{ size_t (*get_size)(starpu_data_handle_t handle)}
@@ -326,10 +326,10 @@ todo
 @item @code{struct starpu_multiformat_data_interface_ops* (*get_mf_ops)(void *data_interface)}
 todo
 
-@item @code{int (*pack_data)(starpu_data_handle_t handle, uint32_t node, void **ptr, size_t *count)}
+@item @code{int (*pack_data)(starpu_data_handle_t handle, unsigned node, void **ptr, size_t *count)}
 Pack the data handle into a contiguous buffer at the address @code{ptr} and set the size of the newly created buffer in @code{count}
 
-@item @code{int (*unpack_data)(starpu_data_handle_t handle, uint32_t node, void *ptr, size_t count)}
+@item @code{int (*unpack_data)(starpu_data_handle_t handle, unsigned node, void *ptr, size_t count)}
 Unpack the data handle from the contiguous buffer at the address @code{ptr} of size @var{count}
 
 @end table
@@ -430,7 +430,7 @@ described below.
 @cartouche
 @smallexample
 void starpu_complex_data_register(starpu_data_handle_t *handle,
-     uint32_t home_node, double *real, double *imaginary, int nx)
+     unsigned home_node, double *real, double *imaginary, int nx)
 @{
         struct starpu_complex_interface complex =
         @{
@@ -565,7 +565,7 @@ pointer to a codelet which converts from CUDA to CPU
 @end table
 @end deftp
 
-@deftypefun void starpu_multiformat_data_register (starpu_data_handle_t *@var{handle}, uint32_t @var{home_node}, void *@var{ptr}, uint32_t @var{nobjects}, struct starpu_multiformat_data_interface_ops *@var{format_ops})
+@deftypefun void starpu_multiformat_data_register (starpu_data_handle_t *@var{handle}, unsigned @var{home_node}, void *@var{ptr}, uint32_t @var{nobjects}, struct starpu_multiformat_data_interface_ops *@var{format_ops})
 Register a piece of data that can be represented in different ways, depending upon
 the processing unit that manipulates it. It allows the programmer, for instance, to
 use an array of structures when working on a CPU, and a structure of arrays when
@@ -1031,7 +1031,7 @@ Returns expected task duration in µs
 Returns an estimated speedup factor relative to CPU speed
 @end deftypefun
 
-@deftypefun double starpu_task_expected_data_transfer_time (uint32_t @var{memory_node}, {struct starpu_task *}@var{task})
+@deftypefun double starpu_task_expected_data_transfer_time (unsigned @var{memory_node}, {struct starpu_task *}@var{task})
 Returns expected data transfer time in µs
 @end deftypefun
 

+ 14 - 14
doc/chapters/basic-api.texi

@@ -348,7 +348,7 @@ todo
 @end table
 @end deftp
 
-@deftypefun {enum starpu_node_kind} starpu_node_get_kind (uint32_t @var{node})
+@deftypefun {enum starpu_node_kind} starpu_node_get_kind (unsigned @var{node})
 Returns the type of the given node as defined by @code{enum
 starpu_node_kind}. For example, when defining a new data interface,
 this function should be used in the allocation function to determine
@@ -446,7 +446,7 @@ over the entire machine, so that we can maintain data consistency and locate
 data replicates for instance.
 @end deftp
 
-@deftypefun void starpu_data_register (starpu_data_handle_t *@var{handleptr}, uint32_t @var{home_node}, void *@var{data_interface}, {struct starpu_data_interface_ops} *@var{ops})
+@deftypefun void starpu_data_register (starpu_data_handle_t *@var{handleptr}, unsigned @var{home_node}, void *@var{data_interface}, {struct starpu_data_interface_ops} *@var{ops})
 Register a piece of data into the handle located at the @var{handleptr}
 address. The @var{data_interface} buffer contains the initial description of the
 data in the home node. The @var{ops} argument is a pointer to a structure
@@ -519,7 +519,7 @@ Return the handle corresponding to the data pointed to by the @var{ptr}
 host pointer.
 @end deftypefun
 
-@deftypefun int starpu_data_request_allocation (starpu_data_handle_t @var{handle}, uint32_t @var{node})
+@deftypefun int starpu_data_request_allocation (starpu_data_handle_t @var{handle}, unsigned @var{node})
 Explicitly ask StarPU to allocate room for a piece of data on the specified
 memory node.
 @end deftypefun
@@ -629,7 +629,7 @@ concurrent execution of different tasks accessing the same "void" data
 in read-write concurrently.
 @end deftypefun
 
-@deftypefun void starpu_variable_data_register ({starpu_data_handle_t *}@var{handle}, uint32_t @var{home_node}, uintptr_t @var{ptr}, size_t @var{size})
+@deftypefun void starpu_variable_data_register ({starpu_data_handle_t *}@var{handle}, unsigned @var{home_node}, uintptr_t @var{ptr}, size_t @var{size})
 Register the @var{size}-byte element pointed to by @var{ptr}, which is
 typically a scalar, and initialize @var{handle} to represent this data
 item.
@@ -643,7 +643,7 @@ starpu_variable_data_register(&var_handle, 0, (uintptr_t)&var, sizeof(var));
 @end cartouche
 @end deftypefun
 
-@deftypefun void starpu_vector_data_register ({starpu_data_handle_t *}@var{handle}, uint32_t @var{home_node}, uintptr_t @var{ptr}, uint32_t @var{nx}, size_t @var{elemsize})
+@deftypefun void starpu_vector_data_register ({starpu_data_handle_t *}@var{handle}, unsigned @var{home_node}, uintptr_t @var{ptr}, uint32_t @var{nx}, size_t @var{elemsize})
 Register the @var{nx} @var{elemsize}-byte elements pointed to by
 @var{ptr} and initialize @var{handle} to represent it.
 
@@ -657,7 +657,7 @@ starpu_vector_data_register(&vector_handle, 0, (uintptr_t)vector, NX,
 @end cartouche
 @end deftypefun
 
-@deftypefun void starpu_matrix_data_register ({starpu_data_handle_t *}@var{handle}, uint32_t @var{home_node}, uintptr_t @var{ptr}, uint32_t @var{ld}, uint32_t @var{nx}, uint32_t @var{ny}, size_t @var{elemsize})
+@deftypefun void starpu_matrix_data_register ({starpu_data_handle_t *}@var{handle}, unsigned @var{home_node}, uintptr_t @var{ptr}, uint32_t @var{ld}, uint32_t @var{nx}, uint32_t @var{ny}, size_t @var{elemsize})
 Register the @var{nx}x@var{ny} 2D matrix of @var{elemsize}-byte elements
 pointed by @var{ptr} and initialize @var{handle} to represent it.
 @var{ld} specifies the number of elements between rows.
@@ -675,7 +675,7 @@ starpu_matrix_data_register(&matrix_handle, 0, (uintptr_t)matrix,
 @end cartouche
 @end deftypefun
 
-@deftypefun void starpu_block_data_register ({starpu_data_handle_t *}@var{handle}, uint32_t @var{home_node}, uintptr_t @var{ptr}, uint32_t @var{ldy}, uint32_t @var{ldz}, uint32_t @var{nx}, uint32_t @var{ny}, uint32_t @var{nz}, size_t @var{elemsize})
+@deftypefun void starpu_block_data_register ({starpu_data_handle_t *}@var{handle}, unsigned @var{home_node}, uintptr_t @var{ptr}, uint32_t @var{ldy}, uint32_t @var{ldz}, uint32_t @var{nx}, uint32_t @var{ny}, uint32_t @var{nz}, size_t @var{elemsize})
 Register the @var{nx}x@var{ny}x@var{nz} 3D matrix of @var{elemsize}-byte
 elements pointed by @var{ptr} and initialize @var{handle} to represent
 it.  Again, @var{ldy} and @var{ldz} specify the number of elements
@@ -692,7 +692,7 @@ starpu_block_data_register(&block_handle, 0, (uintptr_t)block,
 @end cartouche
 @end deftypefun
 
-@deftypefun void starpu_bcsr_data_register (starpu_data_handle_t *@var{handle}, uint32_t @var{home_node}, uint32_t @var{nnz}, uint32_t @var{nrow}, uintptr_t @var{nzval}, uint32_t *@var{colind}, uint32_t *@var{rowptr}, uint32_t @var{firstentry}, uint32_t @var{r}, uint32_t @var{c}, size_t @var{elemsize})
+@deftypefun void starpu_bcsr_data_register (starpu_data_handle_t *@var{handle}, unsigned @var{home_node}, uint32_t @var{nnz}, uint32_t @var{nrow}, uintptr_t @var{nzval}, uint32_t *@var{colind}, uint32_t *@var{rowptr}, uint32_t @var{firstentry}, uint32_t @var{r}, uint32_t @var{c}, size_t @var{elemsize})
 This variant of @code{starpu_data_register} uses the BCSR (Blocked
 Compressed Sparse Row Representation) sparse matrix interface.
 Register the sparse matrix made of @var{nnz} non-zero blocks of elements of size
@@ -704,13 +704,13 @@ in @code{nzval}, @code{rowptr[i]} is the block-index (in nzval) of the first blo
 or 1).
 @end deftypefun
 
-@deftypefun void starpu_csr_data_register (starpu_data_handle_t *@var{handle}, uint32_t @var{home_node}, uint32_t @var{nnz}, uint32_t @var{nrow}, uintptr_t @var{nzval}, uint32_t *@var{colind}, uint32_t *@var{rowptr}, uint32_t @var{firstentry}, size_t @var{elemsize})
+@deftypefun void starpu_csr_data_register (starpu_data_handle_t *@var{handle}, unsigned @var{home_node}, uint32_t @var{nnz}, uint32_t @var{nrow}, uintptr_t @var{nzval}, uint32_t *@var{colind}, uint32_t *@var{rowptr}, uint32_t @var{firstentry}, size_t @var{elemsize})
 This variant of @code{starpu_data_register} uses the CSR (Compressed
 Sparse Row Representation) sparse matrix interface.
 TODO
 @end deftypefun
 
-@deftypefun void starpu_coo_data_register (starpu_data_handle_t *@var{handleptr}, uint32_t @var{home_node}, uint32_t @var{nx}, uint32_t @var{ny}, uint32_t @var{n_values}, uint32_t *@var{columns}, uint32_t *@var{rows}, uintptr_t @var{values}, size_t @var{elemsize});
+@deftypefun void starpu_coo_data_register (starpu_data_handle_t *@var{handleptr}, unsigned @var{home_node}, uint32_t @var{nx}, uint32_t @var{ny}, uint32_t @var{n_values}, uint32_t *@var{columns}, uint32_t *@var{rows}, uintptr_t @var{values}, size_t @var{elemsize});
 Register the @var{nx}x@var{ny} 2D matrix given in the COO format, using the
 @var{columns}, @var{rows}, @var{values} arrays, which must have @var{n_values}
 elements of size @var{elemsize}. Initialize @var{handleptr}.
@@ -757,7 +757,7 @@ The different values are:
 @node Accessing Handle
 @subsubsection Handle
 
-@deftypefun {void *} starpu_handle_to_pointer (starpu_data_handle_t @var{handle}, uint32_t @var{node})
+@deftypefun {void *} starpu_handle_to_pointer (starpu_data_handle_t @var{handle}, unsigned @var{node})
 Return the pointer associated with @var{handle} on node @var{node} or
 @code{NULL} if @var{handle}'s interface does not support this
 operation or data for this handle is not allocated on that node.
@@ -1215,12 +1215,12 @@ Return the size of the elements registered into the matrix designated by
 Applications can provide their own interface. An example is provided in
 @code{examples/interface}. A few helpers are provided.
 
-@deftypefun uintptr_t starpu_allocate_buffer_on_node (uint32_t @var{dst_node}, size_t @var{size})
+@deftypefun uintptr_t starpu_allocate_buffer_on_node (unsigned @var{dst_node}, size_t @var{size})
 Allocate @var{size} bytes on node @var{dst_node}. This returns 0 if allocation
 failed, the allocation method should then return -ENOMEM as allocated size.
 @end deftypefun
 
-@deftypefun void starpu_free_buffer_on_node (uint32_t @var{dst_node}, uintptr_t @var{addr}, size_t @var{size})
+@deftypefun void starpu_free_buffer_on_node (unsigned @var{dst_node}, uintptr_t @var{addr}, size_t @var{size})
 Free @var{addr} of @var{size} bytes on node @var{dst_node}.
 @end deftypefun
 
@@ -1284,7 +1284,7 @@ starpu_data_partition(A_handle, &f);
 @end cartouche
 @end deftypefun
 
-@deftypefun void starpu_data_unpartition (starpu_data_handle_t @var{root_data}, uint32_t @var{gathering_node})
+@deftypefun void starpu_data_unpartition (starpu_data_handle_t @var{root_data}, unsigned @var{gathering_node})
 This unapplies one filter, thus unpartitioning the data. The pieces of data are
 collected back into one big piece in the @var{gathering_node} (usually 0). Tasks
 working on the partitioned data must be already finished when calling @code{starpu_data_unpartition}.

+ 2 - 2
doc/chapters/mpi-support.texi

@@ -136,7 +136,7 @@ handle.
 
 @cartouche
 @smallexample
-static int complex_pack_data(starpu_data_handle_t handle, uint32_t node, void **ptr, size_t *count)
+static int complex_pack_data(starpu_data_handle_t handle, unsigned node, void **ptr, size_t *count)
 @{
   STARPU_ASSERT(starpu_data_test_if_allocated_on_node(handle, node));
 
@@ -156,7 +156,7 @@ static int complex_pack_data(starpu_data_handle_t handle, uint32_t node, void **
 
 @cartouche
 @smallexample
-static int complex_unpack_data(starpu_data_handle_t handle, uint32_t node, void *ptr, size_t count)
+static int complex_unpack_data(starpu_data_handle_t handle, unsigned node, void *ptr, size_t count)
 @{
   STARPU_ASSERT(starpu_data_test_if_allocated_on_node(handle, node));
 

+ 9 - 9
examples/filters/custom_mf/custom_interface.c

@@ -67,13 +67,13 @@ static struct starpu_data_copy_methods custom_copy_data_methods_s =
 };
 
 static void     register_custom_handle(starpu_data_handle_t handle,
-				       uint32_t home_node,
+				       unsigned home_node,
 				       void *data_interface);
 static ssize_t  allocate_custom_buffer_on_node(void *data_interface_,
-					       uint32_t dst_node);
+					       unsigned dst_node);
 static void*    custom_handle_to_pointer(starpu_data_handle_t data_handle,
-					 uint32_t node);
-static void     free_custom_buffer_on_node(void *data_interface, uint32_t node);
+					 unsigned node);
+static void     free_custom_buffer_on_node(void *data_interface, unsigned node);
 static size_t   custom_interface_get_size(starpu_data_handle_t handle);
 static uint32_t footprint_custom_interface_crc32(starpu_data_handle_t handle);
 static void     display_custom_interface(starpu_data_handle_t handle, FILE *f);
@@ -106,7 +106,7 @@ static struct starpu_data_interface_ops interface_custom_ops =
 };
 
 static void
-register_custom_handle(starpu_data_handle_t handle, uint32_t home_node, void *data_interface)
+register_custom_handle(starpu_data_handle_t handle, unsigned home_node, void *data_interface)
 {
 	struct custom_data_interface *custom_interface;
 	custom_interface = (struct custom_data_interface *) data_interface;
@@ -143,7 +143,7 @@ register_custom_handle(starpu_data_handle_t handle, uint32_t home_node, void *da
 	}
 }
 
-static ssize_t allocate_custom_buffer_on_node(void *data_interface, uint32_t node)
+static ssize_t allocate_custom_buffer_on_node(void *data_interface, unsigned node)
 {
 	ssize_t size = 0;
 	struct custom_data_interface *custom_interface;
@@ -186,7 +186,7 @@ fail_cpu:
 	return -ENOMEM;
 }
 
-static void free_custom_buffer_on_node(void *data_interface, uint32_t node)
+static void free_custom_buffer_on_node(void *data_interface, unsigned node)
 {
 	struct custom_data_interface *custom_interface = (struct custom_data_interface *) data_interface;
 	size_t size = custom_interface->nx * custom_interface->ops->cpu_elemsize;
@@ -201,7 +201,7 @@ static void free_custom_buffer_on_node(void *data_interface, uint32_t node)
 }
 
 static void*
-custom_handle_to_pointer(starpu_data_handle_t handle, uint32_t node)
+custom_handle_to_pointer(starpu_data_handle_t handle, unsigned node)
 {
 	struct custom_data_interface *data_interface =
 		(struct custom_data_interface *) starpu_data_get_interface_on_node(handle, node);
@@ -258,7 +258,7 @@ custom_get_nx(starpu_data_handle_t handle)
 
 
 void custom_data_register(starpu_data_handle_t *handle,
-				 uint32_t home_node,
+				 unsigned home_node,
 				 void *ptr,
 				 uint32_t nx,
 				 struct starpu_multiformat_data_interface_ops *format_ops)

+ 1 - 1
examples/filters/custom_mf/custom_interface.h

@@ -26,7 +26,7 @@ struct custom_data_interface
 };
 
 void custom_data_register(starpu_data_handle_t *handle,
-				 uint32_t home_node,
+				 unsigned home_node,
 				 void *ptr,
 				 uint32_t nx,
 				 struct starpu_multiformat_data_interface_ops* ops);

+ 8 - 8
examples/interface/complex_interface.c

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
- * Copyright (C) 2012  Centre National de la Recherche Scientifique
+ * Copyright (C) 2012, 2013  Centre National de la Recherche Scientifique
  *
  * StarPU is free software; you can redistribute it and/or modify
  * it under the terms of the GNU Lesser General Public License as published by
@@ -42,7 +42,7 @@ int starpu_complex_get_nx(starpu_data_handle_t handle)
 	return complex_interface->nx;
 }
 
-static void complex_register_data_handle(starpu_data_handle_t handle, uint32_t home_node, void *data_interface)
+static void complex_register_data_handle(starpu_data_handle_t handle, unsigned home_node, void *data_interface)
 {
 	struct starpu_complex_interface *complex_interface = (struct starpu_complex_interface *) data_interface;
 
@@ -58,7 +58,7 @@ static void complex_register_data_handle(starpu_data_handle_t handle, uint32_t h
 	}
 }
 
-static starpu_ssize_t complex_allocate_data_on_node(void *data_interface, uint32_t node)
+static starpu_ssize_t complex_allocate_data_on_node(void *data_interface, unsigned node)
 {
 	struct starpu_complex_interface *complex_interface = (struct starpu_complex_interface *) data_interface;
 
@@ -85,7 +85,7 @@ fail_real:
 	return -ENOMEM;
 }
 
-static void complex_free_data_on_node(void *data_interface, uint32_t node)
+static void complex_free_data_on_node(void *data_interface, unsigned node)
 {
 	struct starpu_complex_interface *complex_interface = (struct starpu_complex_interface *) data_interface;
 	ssize_t requested_memory = complex_interface->nx * sizeof(complex_interface->real[0]);
@@ -108,7 +108,7 @@ static uint32_t complex_footprint(starpu_data_handle_t handle)
 	return starpu_crc32_be(starpu_complex_get_nx(handle), 0);
 }
 
-static void *complex_handle_to_pointer(starpu_data_handle_t handle, uint32_t node)
+static void *complex_handle_to_pointer(starpu_data_handle_t handle, unsigned node)
 {
 	STARPU_ASSERT(starpu_data_test_if_allocated_on_node(handle, node));
 
@@ -118,7 +118,7 @@ static void *complex_handle_to_pointer(starpu_data_handle_t handle, uint32_t nod
 	return (void*) complex_interface->real;
 }
 
-static int complex_pack_data(starpu_data_handle_t handle, uint32_t node, void **ptr, size_t *count)
+static int complex_pack_data(starpu_data_handle_t handle, unsigned node, void **ptr, size_t *count)
 {
 	STARPU_ASSERT(starpu_data_test_if_allocated_on_node(handle, node));
 
@@ -133,7 +133,7 @@ static int complex_pack_data(starpu_data_handle_t handle, uint32_t node, void **
 	return 0;
 }
 
-static int complex_unpack_data(starpu_data_handle_t handle, uint32_t node, void *ptr, size_t count)
+static int complex_unpack_data(starpu_data_handle_t handle, unsigned node, void *ptr, size_t count)
 {
 	STARPU_ASSERT(starpu_data_test_if_allocated_on_node(handle, node));
 
@@ -296,7 +296,7 @@ static struct starpu_data_interface_ops interface_complex_ops =
 	.unpack_data = complex_unpack_data
 };
 
-void starpu_complex_data_register(starpu_data_handle_t *handleptr, uint32_t home_node, double *real, double *imaginary, int nx)
+void starpu_complex_data_register(starpu_data_handle_t *handleptr, unsigned home_node, double *real, double *imaginary, int nx)
 {
 	struct starpu_complex_interface complex =
 	{

+ 2 - 2
examples/interface/complex_interface.h

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
- * Copyright (C) 2012  Centre National de la Recherche Scientifique
+ * Copyright (C) 2012, 2013  Centre National de la Recherche Scientifique
  *
  * StarPU is free software; you can redistribute it and/or modify
  * it under the terms of the GNU Lesser General Public License as published by
@@ -27,7 +27,7 @@ struct starpu_complex_interface
 	int nx;
 };
 
-void starpu_complex_data_register(starpu_data_handle_t *handle, uint32_t home_node, double *real, double *imaginary, int nx);
+void starpu_complex_data_register(starpu_data_handle_t *handle, unsigned home_node, double *real, double *imaginary, int nx);
 
 double *starpu_complex_get_real(starpu_data_handle_t handle);
 double *starpu_complex_get_imaginary(starpu_data_handle_t handle);

+ 1 - 1
gcc-plugin/tests/mocks.h

@@ -293,7 +293,7 @@ struct data_register_arguments expected_register_arguments;
 
 void
 starpu_vector_data_register (starpu_data_handle_t *handle,
-			     uint32_t home_node, uintptr_t ptr,
+			     unsigned home_node, uintptr_t ptr,
 			     uint32_t count, size_t elemsize)
 {
   /* Sometimes tests cannot tell what the pointer will be (for instance, for

+ 3 - 3
include/starpu_data.h

@@ -94,7 +94,7 @@ void starpu_memory_display_stats();
 #define starpu_data_malloc_pinned_if_possible	starpu_malloc
 #define starpu_data_free_pinned_if_possible	starpu_free
 
-int starpu_data_request_allocation(starpu_data_handle_t handle, uint32_t node);
+int starpu_data_request_allocation(starpu_data_handle_t handle, unsigned node);
 
 int starpu_data_prefetch_on_node(starpu_data_handle_t handle, unsigned node, unsigned async);
 
@@ -109,7 +109,7 @@ enum starpu_node_kind
 
 unsigned starpu_worker_get_memory_node(unsigned workerid);
 unsigned starpu_memory_nodes_get_count(void);
-enum starpu_node_kind starpu_node_get_kind(uint32_t node);
+enum starpu_node_kind starpu_node_get_kind(unsigned node);
 
 
 /* It is possible to associate a mask to a piece of data (and its children) so
@@ -135,7 +135,7 @@ int starpu_data_get_rank(starpu_data_handle_t handle);
 int starpu_data_set_tag(starpu_data_handle_t handle, int tag);
 int starpu_data_get_tag(starpu_data_handle_t handle);
 
-unsigned starpu_data_test_if_allocated_on_node(starpu_data_handle_t handle, uint32_t memory_node);
+unsigned starpu_data_test_if_allocated_on_node(starpu_data_handle_t handle, unsigned memory_node);
 
 #ifdef __cplusplus
 }

+ 2 - 2
include/starpu_data_filters.h

@@ -2,7 +2,7 @@
  *
  * Copyright (C) 2010-2012  Université de Bordeaux 1
  * Copyright (C) 2010  Mehdi Juhoor <mjuhoor@gmail.com>
- * Copyright (C) 2010, 2011, 2012  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010, 2011, 2012, 2013  Centre National de la Recherche Scientifique
  *
  * StarPU is free software; you can redistribute it and/or modify
  * it under the terms of the GNU Lesser General Public License as published by
@@ -40,7 +40,7 @@ struct starpu_data_filter
 };
 
 void starpu_data_partition(starpu_data_handle_t initial_handle, struct starpu_data_filter *f);
-void starpu_data_unpartition(starpu_data_handle_t root_data, uint32_t gathering_node);
+void starpu_data_unpartition(starpu_data_handle_t root_data, unsigned gathering_node);
 
 int starpu_data_get_nb_children(starpu_data_handle_t handle);
 starpu_data_handle_t starpu_data_get_child(starpu_data_handle_t handle, unsigned i);

+ 18 - 18
include/starpu_data_interfaces.h

@@ -93,15 +93,15 @@ struct starpu_data_interface_ops
 {
 	/* Register an existing interface into a data handle. */
 	void (*register_data_handle)(starpu_data_handle_t handle,
-					uint32_t home_node, void *data_interface);
+				     unsigned home_node, void *data_interface);
 	/* Allocate data for the interface on a given node. */
-	starpu_ssize_t (*allocate_data_on_node)(void *data_interface, uint32_t node);
+	starpu_ssize_t (*allocate_data_on_node)(void *data_interface, unsigned node);
 	/* Free data of the interface on a given node. */
-	void (*free_data_on_node)(void *data_interface, uint32_t node);
+	void (*free_data_on_node)(void *data_interface, unsigned node);
 	/* ram/cuda/opencl synchronous and asynchronous transfer methods */
 	struct starpu_data_copy_methods *copy_methods;
 	/* Return the current pointer (if any) for the handle on the given node. */
-	void * (*handle_to_pointer)(starpu_data_handle_t handle, uint32_t node);
+	void * (*handle_to_pointer)(starpu_data_handle_t handle, unsigned node);
 	/* Return an estimation of the size of data, for performance models */
 	size_t (*get_size)(starpu_data_handle_t handle);
 	/* Return a 32bit footprint which characterizes the data size */
@@ -119,26 +119,26 @@ struct starpu_data_interface_ops
 	struct starpu_multiformat_data_interface_ops* (*get_mf_ops)(void *data_interface);
 
 	/* Pack the data handle into a contiguous buffer at the address ptr and store the size of the buffer in count */
-	int (*pack_data)(starpu_data_handle_t handle, uint32_t node, void **ptr, size_t *count);
+	int (*pack_data)(starpu_data_handle_t handle, unsigned node, void **ptr, size_t *count);
 	/* Unpack the data handle from the contiguous buffer at the address ptr */
-	int (*unpack_data)(starpu_data_handle_t handle, uint32_t node, void *ptr, size_t count);
+	int (*unpack_data)(starpu_data_handle_t handle, unsigned node, void *ptr, size_t count);
 };
 
 /* Return the next available id for a data interface */
 int starpu_data_interface_get_next_id(void);
 
-void starpu_data_register(starpu_data_handle_t *handleptr, uint32_t home_node, void *data_interface, struct starpu_data_interface_ops *ops);
+void starpu_data_register(starpu_data_handle_t *handleptr, unsigned home_node, void *data_interface, struct starpu_data_interface_ops *ops);
 void starpu_data_register_same(starpu_data_handle_t *handledst, starpu_data_handle_t handlesrc);
 
 /* Allocate SIZE bytes on node NODE */
-uintptr_t starpu_allocate_buffer_on_node(uint32_t dst_node, size_t size);
+uintptr_t starpu_allocate_buffer_on_node(unsigned dst_node, size_t size);
 /* Free ADDR on node NODE */
-void starpu_free_buffer_on_node(uint32_t dst_node, uintptr_t addr, size_t size);
+void starpu_free_buffer_on_node(unsigned dst_node, uintptr_t addr, size_t size);
 
 /* Return the pointer associated with HANDLE on node NODE or NULL if HANDLE's
  * interface does not support this operation or data for this handle is not
  * allocated on that node. */
-void *starpu_handle_to_pointer(starpu_data_handle_t handle, uint32_t node);
+void *starpu_handle_to_pointer(starpu_data_handle_t handle, unsigned node);
 
 /* Return the local pointer associated with HANDLE or NULL if HANDLE's
  * interface does not have data allocated locally */
@@ -167,7 +167,7 @@ struct starpu_matrix_interface
 	size_t elemsize;
 };
 
-void starpu_matrix_data_register(starpu_data_handle_t *handle, uint32_t home_node, uintptr_t ptr, uint32_t ld, uint32_t nx, uint32_t ny, size_t elemsize);
+void starpu_matrix_data_register(starpu_data_handle_t *handle, unsigned home_node, uintptr_t ptr, uint32_t ld, uint32_t nx, uint32_t ny, size_t elemsize);
 uint32_t starpu_matrix_get_nx(starpu_data_handle_t handle);
 uint32_t starpu_matrix_get_ny(starpu_data_handle_t handle);
 uint32_t starpu_matrix_get_local_ld(starpu_data_handle_t handle);
@@ -197,7 +197,7 @@ struct starpu_coo_interface
 	size_t    elemsize;
 };
 
-void starpu_coo_data_register(starpu_data_handle_t *handleptr, uint32_t home_node, uint32_t nx, uint32_t ny, uint32_t n_values, uint32_t *columns, uint32_t *rows, uintptr_t values, size_t elemsize);
+void starpu_coo_data_register(starpu_data_handle_t *handleptr, unsigned home_node, uint32_t nx, uint32_t ny, uint32_t n_values, uint32_t *columns, uint32_t *rows, uintptr_t values, size_t elemsize);
 
 #define STARPU_COO_GET_COLUMNS(interface) \
 	(((struct starpu_coo_interface *)(interface))->columns)
@@ -236,7 +236,7 @@ struct starpu_block_interface
 	size_t elemsize;
 };
 
-void starpu_block_data_register(starpu_data_handle_t *handle, uint32_t home_node, uintptr_t ptr, uint32_t ldy, uint32_t ldz, uint32_t nx, uint32_t ny, uint32_t nz, size_t elemsize);
+void starpu_block_data_register(starpu_data_handle_t *handle, unsigned home_node, uintptr_t ptr, uint32_t ldy, uint32_t ldz, uint32_t nx, uint32_t ny, uint32_t nz, size_t elemsize);
 uint32_t starpu_block_get_nx(starpu_data_handle_t handle);
 uint32_t starpu_block_get_ny(starpu_data_handle_t handle);
 uint32_t starpu_block_get_nz(starpu_data_handle_t handle);
@@ -266,7 +266,7 @@ struct starpu_vector_interface
 	size_t elemsize;
 };
 
-void starpu_vector_data_register(starpu_data_handle_t *handle, uint32_t home_node, uintptr_t ptr, uint32_t nx, size_t elemsize);
+void starpu_vector_data_register(starpu_data_handle_t *handle, unsigned home_node, uintptr_t ptr, uint32_t nx, size_t elemsize);
 uint32_t starpu_vector_get_nx(starpu_data_handle_t handle);
 size_t starpu_vector_get_elemsize(starpu_data_handle_t handle);
 uintptr_t starpu_vector_get_local_ptr(starpu_data_handle_t handle);
@@ -286,7 +286,7 @@ struct starpu_variable_interface
 	/* No dev_handle, since it can not be filtered, offset will always be zero */
 };
 
-void starpu_variable_data_register(starpu_data_handle_t *handle, uint32_t home_node, uintptr_t ptr, size_t size);
+void starpu_variable_data_register(starpu_data_handle_t *handle, unsigned home_node, uintptr_t ptr, size_t size);
 size_t starpu_variable_get_elemsize(starpu_data_handle_t handle);
 uintptr_t starpu_variable_get_local_ptr(starpu_data_handle_t handle);
 
@@ -320,7 +320,7 @@ struct starpu_csr_interface
 	size_t elemsize;
 };
 
-void starpu_csr_data_register(starpu_data_handle_t *handle, uint32_t home_node, uint32_t nnz, uint32_t nrow, uintptr_t nzval, uint32_t *colind, uint32_t *rowptr, uint32_t firstentry, size_t elemsize);
+void starpu_csr_data_register(starpu_data_handle_t *handle, unsigned home_node, uint32_t nnz, uint32_t nrow, uintptr_t nzval, uint32_t *colind, uint32_t *rowptr, uint32_t firstentry, size_t elemsize);
 uint32_t starpu_csr_get_nnz(starpu_data_handle_t handle);
 uint32_t starpu_csr_get_nrow(starpu_data_handle_t handle);
 uint32_t starpu_csr_get_firstentry(starpu_data_handle_t handle);
@@ -367,7 +367,7 @@ struct starpu_bcsr_interface
 	size_t elemsize;
 };
 
-void starpu_bcsr_data_register(starpu_data_handle_t *handle, uint32_t home_node, uint32_t nnz, uint32_t nrow, uintptr_t nzval, uint32_t *colind, uint32_t *rowptr, uint32_t firstentry, uint32_t r, uint32_t c, size_t elemsize);
+void starpu_bcsr_data_register(starpu_data_handle_t *handle, unsigned home_node, uint32_t nnz, uint32_t nrow, uintptr_t nzval, uint32_t *colind, uint32_t *rowptr, uint32_t firstentry, uint32_t r, uint32_t c, size_t elemsize);
 
 #define STARPU_BCSR_GET_NNZ(interface)        (((struct starpu_bcsr_interface *)(interface))->nnz)
 #define STARPU_BCSR_GET_NZVAL(interface)      (((struct starpu_bcsr_interface *)(interface))->nzval)
@@ -413,7 +413,7 @@ struct starpu_multiformat_interface
 	struct starpu_multiformat_data_interface_ops *ops;
 };
 
-void starpu_multiformat_data_register(starpu_data_handle_t *handle, uint32_t home_node, void *ptr, uint32_t nobjects, struct starpu_multiformat_data_interface_ops *format_ops);
+void starpu_multiformat_data_register(starpu_data_handle_t *handle, unsigned home_node, void *ptr, uint32_t nobjects, struct starpu_multiformat_data_interface_ops *format_ops);
 
 #define STARPU_MULTIFORMAT_GET_CPU_PTR(interface)  (((struct starpu_multiformat_interface *)(interface))->cpu_ptr)
 #define STARPU_MULTIFORMAT_GET_CUDA_PTR(interface) (((struct starpu_multiformat_interface *)(interface))->cuda_ptr)

+ 2 - 2
include/starpu_scheduler.h

@@ -175,7 +175,7 @@ int starpu_combined_worker_can_execute_task(unsigned workerid, struct starpu_tas
 /* Whether STARPU_PREFETCH was set */
 int starpu_get_prefetch_flag(void);
 /* Prefetch data for a given task on a given node */
-int starpu_prefetch_task_input_on_node(struct starpu_task *task, uint32_t node);
+int starpu_prefetch_task_input_on_node(struct starpu_task *task, unsigned node);
 
 /*
  *	Performance predictions
@@ -188,7 +188,7 @@ double starpu_task_expected_length(struct starpu_task *task, enum starpu_perf_ar
 /* Returns an estimated speedup factor relative to CPU speed */
 double starpu_worker_get_relative_speedup(enum starpu_perf_archtype perf_archtype);
 /* Returns expected data transfer time in us */
-double starpu_task_expected_data_transfer_time(uint32_t memory_node, struct starpu_task *task);
+double starpu_task_expected_data_transfer_time(unsigned memory_node, struct starpu_task *task);
 /* Predict the transfer time (in us) to move a handle to a memory node */
 double starpu_data_expected_transfer_time(starpu_data_handle_t handle, unsigned memory_node, enum starpu_access_mode mode);
 /* Returns expected power consumption in J */

+ 2 - 2
src/core/perfmodel/perfmodel.c

@@ -273,12 +273,12 @@ double starpu_data_expected_transfer_time(starpu_data_handle_t handle, unsigned
 	if (size == 0)
 		return 0.0;
 
-	uint32_t src_node = _starpu_select_src_node(handle, memory_node);
+	unsigned src_node = _starpu_select_src_node(handle, memory_node);
 	return _starpu_predict_transfer_time(src_node, memory_node, size);
 }
 
 /* Data transfer performance modeling */
-double starpu_task_expected_data_transfer_time(uint32_t memory_node, struct starpu_task *task)
+double starpu_task_expected_data_transfer_time(unsigned memory_node, struct starpu_task *task)
 {
 	unsigned nbuffers = task->cl->nbuffers;
 	unsigned buffer;

+ 11 - 11
src/datawizard/coherency.c

@@ -24,7 +24,7 @@
 #include <math.h>
 
 static int link_supports_direct_transfers(starpu_data_handle_t handle, unsigned src_node, unsigned dst_node, unsigned *handling_node);
-uint32_t _starpu_select_src_node(starpu_data_handle_t handle, unsigned destination)
+unsigned _starpu_select_src_node(starpu_data_handle_t handle, unsigned destination)
 {
 	int src_node = -1;
 	unsigned i;
@@ -32,9 +32,9 @@ uint32_t _starpu_select_src_node(starpu_data_handle_t handle, unsigned destinati
 	unsigned nnodes = starpu_memory_nodes_get_count();
 
 	/* first find a valid copy, either a STARPU_OWNER or a STARPU_SHARED */
-	uint32_t node;
+	unsigned node;
 
-	uint32_t src_node_mask = 0;
+	unsigned src_node_mask = 0;
 	size_t size = _starpu_data_get_size(handle);
 	double cost = INFINITY;
 
@@ -130,7 +130,7 @@ void _starpu_update_data_state(starpu_data_handle_t handle,
 	if (mode & STARPU_W)
 	{
 		/* the requesting node now has the only valid copy */
-		uint32_t node;
+		unsigned node;
 		for (node = 0; node < nnodes; node++)
 			handle->per_node[node].state = STARPU_INVALID;
 
@@ -141,7 +141,7 @@ void _starpu_update_data_state(starpu_data_handle_t handle,
 		if (requesting_replicate->state != STARPU_OWNER)
 		{
 			/* there was at least another copy of the data */
-			uint32_t node;
+			unsigned node;
 			for (node = 0; node < nnodes; node++)
 			{
 				struct _starpu_data_replicate *replicate = &handle->per_node[node];
@@ -382,7 +382,7 @@ struct _starpu_data_request *_starpu_create_request_to_fetch_data(starpu_data_ha
 	STARPU_ASSERT(dst_replicate->state == STARPU_INVALID);
 
 	/* find someone who already has the data */
-	uint32_t src_node = 0;
+	unsigned src_node = 0;
 
 	/* if the data is in write only mode, there is no need for a source */
 	if (mode & STARPU_R)
@@ -478,7 +478,7 @@ int _starpu_fetch_data_on_node(starpu_data_handle_t handle, struct _starpu_data_
 			       enum starpu_access_mode mode, unsigned detached, unsigned async,
 			       void (*callback_func)(void *), void *callback_arg)
 {
-	uint32_t local_node = _starpu_memory_node_get_local_key();
+	unsigned local_node = _starpu_memory_node_get_local_key();
         _STARPU_LOG_IN();
 
 	while (_starpu_spin_trylock(&handle->header_lock))
@@ -518,7 +518,7 @@ static int fetch_data(starpu_data_handle_t handle, struct _starpu_data_replicate
 	return _starpu_fetch_data_on_node(handle, replicate, mode, 0, 0, NULL, NULL);
 }
 
-uint32_t _starpu_get_data_refcnt(starpu_data_handle_t handle, uint32_t node)
+uint32_t _starpu_get_data_refcnt(starpu_data_handle_t handle, unsigned node)
 {
 	return handle->per_node[node].refcnt;
 }
@@ -551,7 +551,7 @@ void _starpu_release_data_on_node(starpu_data_handle_t handle, uint32_t default_
 	if ((wt_mask & ~(1<<memory_node)))
 		_starpu_write_through_data(handle, memory_node, wt_mask);
 
-	uint32_t local_node = _starpu_memory_node_get_local_key();
+	unsigned local_node = _starpu_memory_node_get_local_key();
 	while (_starpu_spin_trylock(&handle->header_lock))
 		_starpu_datawizard_progress(local_node, 1);
 
@@ -580,7 +580,7 @@ static void _starpu_set_data_requested_flag_if_needed(struct _starpu_data_replic
 //	_starpu_spin_unlock(&handle->header_lock);
 }
 
-int starpu_prefetch_task_input_on_node(struct starpu_task *task, uint32_t node)
+int starpu_prefetch_task_input_on_node(struct starpu_task *task, unsigned node)
 {
 	unsigned nbuffers = task->cl->nbuffers;
 	unsigned index;
@@ -734,7 +734,7 @@ void _starpu_push_task_output(struct _starpu_job *j, uint32_t mask)
 
 /* NB : this value can only be an indication of the status of a data
 	at some point, but there is no strong garantee ! */
-unsigned _starpu_is_data_present_or_requested(starpu_data_handle_t handle, uint32_t node)
+unsigned _starpu_is_data_present_or_requested(starpu_data_handle_t handle, unsigned node)
 {
 	unsigned ret = 0;
 

+ 4 - 4
src/datawizard/coherency.h

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2009-2012  Université de Bordeaux 1
- * Copyright (C) 2010, 2011, 2012  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010, 2011, 2012, 2013  Centre National de la Recherche Scientifique
  *
  * StarPU is free software; you can redistribute it and/or modify
  * it under the terms of the GNU Lesser General Public License as published by
@@ -232,7 +232,7 @@ void _starpu_update_data_state(starpu_data_handle_t handle,
 			       struct _starpu_data_replicate *requesting_replicate,
 			       enum starpu_access_mode mode);
 
-uint32_t _starpu_get_data_refcnt(struct _starpu_data_state *state, uint32_t node);
+uint32_t _starpu_get_data_refcnt(struct _starpu_data_state *state, unsigned node);
 
 size_t _starpu_data_get_size(starpu_data_handle_t handle);
 
@@ -243,9 +243,9 @@ void _starpu_push_task_output(struct _starpu_job *j, uint32_t mask);
 __attribute__((warn_unused_result))
 int _starpu_fetch_task_input(struct _starpu_job *j, uint32_t mask);
 
-unsigned _starpu_is_data_present_or_requested(struct _starpu_data_state *state, uint32_t node);
+unsigned _starpu_is_data_present_or_requested(struct _starpu_data_state *state, unsigned node);
 
-uint32_t _starpu_select_src_node(struct _starpu_data_state *state, unsigned destination);
+unsigned _starpu_select_src_node(struct _starpu_data_state *state, unsigned destination);
 
 /* is_prefetch is whether the DSM may drop the request (when there is not enough memory for instance
  * async is whether the caller wants a reference on the last request, to be

+ 11 - 11
src/datawizard/data_request.c

@@ -83,7 +83,7 @@ static void starpu_data_request_destroy(struct _starpu_data_request *r)
 struct _starpu_data_request *_starpu_create_data_request(starpu_data_handle_t handle,
 							 struct _starpu_data_replicate *src_replicate,
 							 struct _starpu_data_replicate *dst_replicate,
-							 uint32_t handling_node,
+							 unsigned handling_node,
 							 enum starpu_access_mode mode,
 							 unsigned ndeps,
 							 unsigned is_prefetch)
@@ -138,7 +138,7 @@ int _starpu_wait_data_request_completion(struct _starpu_data_request *r, unsigne
 	int retval;
 	int do_delete = 0;
 
-	uint32_t local_node = _starpu_memory_node_get_local_key();
+	unsigned local_node = _starpu_memory_node_get_local_key();
 
 	do
 	{
@@ -179,7 +179,7 @@ int _starpu_wait_data_request_completion(struct _starpu_data_request *r, unsigne
 }
 
 /* this is non blocking */
-void _starpu_post_data_request(struct _starpu_data_request *r, uint32_t handling_node)
+void _starpu_post_data_request(struct _starpu_data_request *r, unsigned handling_node)
 {
 //	_STARPU_DEBUG("POST REQUEST\n");
 
@@ -262,8 +262,8 @@ static void starpu_handle_data_request_completion(struct _starpu_data_request *r
 #endif
 
 #ifdef STARPU_USE_FXT
-	uint32_t src_node = src_replicate->memory_node;
-	uint32_t dst_node = dst_replicate->memory_node;
+	unsigned src_node = src_replicate->memory_node;
+	unsigned dst_node = dst_replicate->memory_node;
 	size_t size = _starpu_data_get_size(handle);
 	_STARPU_TRACE_END_DRIVER_COPY(src_node, dst_node, size, r->com_id);
 #endif
@@ -384,7 +384,7 @@ static int starpu_handle_data_request(struct _starpu_data_request *r, unsigned m
 	return 0;
 }
 
-void _starpu_handle_node_data_requests(uint32_t src_node, unsigned may_alloc)
+void _starpu_handle_node_data_requests(unsigned src_node, unsigned may_alloc)
 {
 	struct _starpu_data_request *r;
 	struct _starpu_data_request_list *new_data_requests;
@@ -439,7 +439,7 @@ void _starpu_handle_node_data_requests(uint32_t src_node, unsigned may_alloc)
 	_starpu_data_request_list_delete(local_list);
 }
 
-void _starpu_handle_node_prefetch_requests(uint32_t src_node, unsigned may_alloc)
+void _starpu_handle_node_prefetch_requests(unsigned src_node, unsigned may_alloc)
 {
 	struct _starpu_data_request *r;
 	struct _starpu_data_request_list *new_data_requests;
@@ -516,7 +516,7 @@ void _starpu_handle_node_prefetch_requests(uint32_t src_node, unsigned may_alloc
 	_starpu_data_request_list_delete(local_list);
 }
 
-static void _handle_pending_node_data_requests(uint32_t src_node, unsigned force)
+static void _handle_pending_node_data_requests(unsigned src_node, unsigned force)
 {
 //	_STARPU_DEBUG("_starpu_handle_pending_node_data_requests ...\n");
 //
@@ -588,17 +588,17 @@ static void _handle_pending_node_data_requests(uint32_t src_node, unsigned force
 	_starpu_data_request_list_delete(new_data_requests_pending);
 }
 
-void _starpu_handle_pending_node_data_requests(uint32_t src_node)
+void _starpu_handle_pending_node_data_requests(unsigned src_node)
 {
 	_handle_pending_node_data_requests(src_node, 0);
 }
 
-void _starpu_handle_all_pending_node_data_requests(uint32_t src_node)
+void _starpu_handle_all_pending_node_data_requests(unsigned src_node)
 {
 	_handle_pending_node_data_requests(src_node, 1);
 }
 
-int _starpu_check_that_no_data_request_exists(uint32_t node)
+int _starpu_check_that_no_data_request_exists(unsigned node)
 {
 	/* XXX lock that !!! that's a quick'n'dirty test */
 	int no_request;

+ 9 - 9
src/datawizard/data_request.h

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2009, 2010  Université de Bordeaux 1
- * Copyright (C) 2010, 2011  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010, 2011, 2013  Centre National de la Recherche Scientifique
  *
  * StarPU is free software; you can redistribute it and/or modify
  * it under the terms of the GNU Lesser General Public License as published by
@@ -41,7 +41,7 @@ LIST_TYPE(_starpu_data_request,
 	struct _starpu_data_replicate *src_replicate;
 	struct _starpu_data_replicate *dst_replicate;
 
-	uint32_t handling_node;
+	unsigned handling_node;
 
 	enum starpu_access_mode mode;
 
@@ -89,19 +89,19 @@ LIST_TYPE(_starpu_data_requester,
 
 void _starpu_init_data_request_lists(void);
 void _starpu_deinit_data_request_lists(void);
-void _starpu_post_data_request(struct _starpu_data_request *r, uint32_t handling_node);
-void _starpu_handle_node_data_requests(uint32_t src_node, unsigned may_alloc);
-void _starpu_handle_node_prefetch_requests(uint32_t src_node, unsigned may_alloc);
+void _starpu_post_data_request(struct _starpu_data_request *r, unsigned handling_node);
+void _starpu_handle_node_data_requests(unsigned src_node, unsigned may_alloc);
+void _starpu_handle_node_prefetch_requests(unsigned src_node, unsigned may_alloc);
 
-void _starpu_handle_pending_node_data_requests(uint32_t src_node);
-void _starpu_handle_all_pending_node_data_requests(uint32_t src_node);
+void _starpu_handle_pending_node_data_requests(unsigned src_node);
+void _starpu_handle_all_pending_node_data_requests(unsigned src_node);
 
-int _starpu_check_that_no_data_request_exists(uint32_t node);
+int _starpu_check_that_no_data_request_exists(unsigned node);
 
 struct _starpu_data_request *_starpu_create_data_request(starpu_data_handle_t handle,
 							 struct _starpu_data_replicate *src_replicate,
 							 struct _starpu_data_replicate *dst_replicate,
-							 uint32_t handling_node,
+							 unsigned handling_node,
 							 enum starpu_access_mode mode,
 							 unsigned ndeps,
 							 unsigned is_prefetch);

+ 2 - 2
src/datawizard/datawizard.h

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2009, 2010  Université de Bordeaux 1
- * Copyright (C) 2010  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010, 2013  Centre National de la Recherche Scientifique
  *
  * StarPU is free software; you can redistribute it and/or modify
  * it under the terms of the GNU Lesser General Public License as published by
@@ -33,6 +33,6 @@
 
 #include <core/dependencies/implicit_data_deps.h>
 
-void _starpu_datawizard_progress(uint32_t memory_node, unsigned may_alloc);
+void _starpu_datawizard_progress(unsigned memory_node, unsigned may_alloc);
 
 #endif // __DATAWIZARD_H__

+ 1 - 1
src/datawizard/filters.c

@@ -269,7 +269,7 @@ void _starpu_empty_codelet_function(void *buffers[], void *args)
 	(void) args; // unused;
 }
 
-void starpu_data_unpartition(starpu_data_handle_t root_handle, uint32_t gathering_node)
+void starpu_data_unpartition(starpu_data_handle_t root_handle, unsigned gathering_node)
 {
 	unsigned child;
 	unsigned node;

+ 7 - 7
src/datawizard/interfaces/bcsr_interface.c

@@ -56,9 +56,9 @@ static struct starpu_data_copy_methods bcsr_copy_data_methods_s =
 #endif
 };
 
-static void register_bcsr_handle(starpu_data_handle_t handle, uint32_t home_node, void *data_interface);
-static ssize_t allocate_bcsr_buffer_on_node(void *data_interface, uint32_t dst_node);
-static void free_bcsr_buffer_on_node(void *data_interface, uint32_t node);
+static void register_bcsr_handle(starpu_data_handle_t handle, unsigned home_node, void *data_interface);
+static ssize_t allocate_bcsr_buffer_on_node(void *data_interface, unsigned dst_node);
+static void free_bcsr_buffer_on_node(void *data_interface, unsigned node);
 static size_t bcsr_interface_get_size(starpu_data_handle_t handle);
 static int bcsr_compare(void *data_interface_a, void *data_interface_b);
 static uint32_t footprint_bcsr_interface_crc32(starpu_data_handle_t handle);
@@ -77,7 +77,7 @@ static struct starpu_data_interface_ops interface_bcsr_ops =
 	.compare = bcsr_compare
 };
 
-static void register_bcsr_handle(starpu_data_handle_t handle, uint32_t home_node, void *data_interface)
+static void register_bcsr_handle(starpu_data_handle_t handle, unsigned home_node, void *data_interface)
 {
 	struct starpu_bcsr_interface *bcsr_interface = (struct starpu_bcsr_interface *) data_interface;
 
@@ -109,7 +109,7 @@ static void register_bcsr_handle(starpu_data_handle_t handle, uint32_t home_node
 	}
 }
 
-void starpu_bcsr_data_register(starpu_data_handle_t *handleptr, uint32_t home_node,
+void starpu_bcsr_data_register(starpu_data_handle_t *handleptr, unsigned home_node,
 		uint32_t nnz, uint32_t nrow, uintptr_t nzval, uint32_t *colind,
 		uint32_t *rowptr, uint32_t firstentry,
 		uint32_t r, uint32_t c, size_t elemsize)
@@ -254,7 +254,7 @@ static size_t bcsr_interface_get_size(starpu_data_handle_t handle)
 /* memory allocation/deallocation primitives for the BLAS interface */
 
 /* returns the size of the allocated area */
-static ssize_t allocate_bcsr_buffer_on_node(void *data_interface_, uint32_t dst_node)
+static ssize_t allocate_bcsr_buffer_on_node(void *data_interface_, unsigned dst_node)
 {
 	uintptr_t addr_nzval, addr_colind, addr_rowptr;
 	ssize_t allocated_memory;
@@ -299,7 +299,7 @@ fail_nzval:
 	return -ENOMEM;
 }
 
-static void free_bcsr_buffer_on_node(void *data_interface, uint32_t node)
+static void free_bcsr_buffer_on_node(void *data_interface, unsigned node)
 {
 	struct starpu_bcsr_interface *bcsr_interface = (struct starpu_bcsr_interface *) data_interface;
 	uint32_t nnz = bcsr_interface->nnz;

+ 9 - 9
src/datawizard/interfaces/block_interface.c

@@ -61,10 +61,10 @@ static struct starpu_data_copy_methods block_copy_data_methods_s =
 };
 
 
-static void register_block_handle(starpu_data_handle_t handle, uint32_t home_node, void *data_interface);
-static void *block_handle_to_pointer(starpu_data_handle_t data_handle, uint32_t node);
-static ssize_t allocate_block_buffer_on_node(void *data_interface_, uint32_t dst_node);
-static void free_block_buffer_on_node(void *data_interface, uint32_t node);
+static void register_block_handle(starpu_data_handle_t handle, unsigned home_node, void *data_interface);
+static void *block_handle_to_pointer(starpu_data_handle_t data_handle, unsigned node);
+static ssize_t allocate_block_buffer_on_node(void *data_interface_, unsigned dst_node);
+static void free_block_buffer_on_node(void *data_interface, unsigned node);
 static size_t block_interface_get_size(starpu_data_handle_t handle);
 static uint32_t footprint_block_interface_crc32(starpu_data_handle_t handle);
 static int block_compare(void *data_interface_a, void *data_interface_b);
@@ -85,7 +85,7 @@ static struct starpu_data_interface_ops interface_block_ops =
 	.display = display_block_interface,
 };
 
-static void *block_handle_to_pointer(starpu_data_handle_t handle, uint32_t node)
+static void *block_handle_to_pointer(starpu_data_handle_t handle, unsigned node)
 {
 	STARPU_ASSERT(starpu_data_test_if_allocated_on_node(handle, node));
 
@@ -95,7 +95,7 @@ static void *block_handle_to_pointer(starpu_data_handle_t handle, uint32_t node)
 	return (void*) block_interface->ptr;
 }
 
-static void register_block_handle(starpu_data_handle_t handle, uint32_t home_node, void *data_interface)
+static void register_block_handle(starpu_data_handle_t handle, unsigned home_node, void *data_interface)
 {
 	struct starpu_block_interface *block_interface = (struct starpu_block_interface *) data_interface;
 
@@ -130,7 +130,7 @@ static void register_block_handle(starpu_data_handle_t handle, uint32_t home_nod
 }
 
 /* declare a new data with the BLAS interface */
-void starpu_block_data_register(starpu_data_handle_t *handleptr, uint32_t home_node,
+void starpu_block_data_register(starpu_data_handle_t *handleptr, unsigned home_node,
 			uintptr_t ptr, uint32_t ldy, uint32_t ldz, uint32_t nx,
 			uint32_t ny, uint32_t nz, size_t elemsize)
 {
@@ -270,7 +270,7 @@ size_t starpu_block_get_elemsize(starpu_data_handle_t handle)
 /* memory allocation/deallocation primitives for the BLOCK interface */
 
 /* returns the size of the allocated area */
-static ssize_t allocate_block_buffer_on_node(void *data_interface_, uint32_t dst_node)
+static ssize_t allocate_block_buffer_on_node(void *data_interface_, unsigned dst_node)
 {
 	uintptr_t addr = 0, handle;
 
@@ -303,7 +303,7 @@ static ssize_t allocate_block_buffer_on_node(void *data_interface_, uint32_t dst
 	return allocated_memory;
 }
 
-static void free_block_buffer_on_node(void *data_interface, uint32_t node)
+static void free_block_buffer_on_node(void *data_interface, unsigned node)
 {
 	struct starpu_block_interface *block_interface = (struct starpu_block_interface *) data_interface;
 	uint32_t nx = block_interface->nx;

+ 4 - 4
src/datawizard/interfaces/coo_interface.c

@@ -324,7 +324,7 @@ static struct starpu_data_copy_methods coo_copy_data_methods =
 };
 
 static void
-register_coo_handle(starpu_data_handle_t handle, uint32_t home_node,
+register_coo_handle(starpu_data_handle_t handle, unsigned home_node,
 		    void *data_interface)
 {
 	struct starpu_coo_interface *coo_interface =
@@ -358,7 +358,7 @@ register_coo_handle(starpu_data_handle_t handle, uint32_t home_node,
 }
 
 static ssize_t
-allocate_coo_buffer_on_node(void *data_interface, uint32_t dst_node)
+allocate_coo_buffer_on_node(void *data_interface, unsigned dst_node)
 {
 	uint32_t *addr_columns = NULL;
 	uint32_t *addr_rows = NULL;
@@ -395,7 +395,7 @@ fail_columns:
 }
 
 static void
-free_coo_buffer_on_node(void *data_interface, uint32_t node)
+free_coo_buffer_on_node(void *data_interface, unsigned node)
 {
 	struct starpu_coo_interface *coo_interface = (struct starpu_coo_interface *) data_interface;
 	uint32_t n_values = coo_interface->n_values;
@@ -466,7 +466,7 @@ struct starpu_data_interface_ops _starpu_interface_coo_ops =
 };
 
 void
-starpu_coo_data_register(starpu_data_handle_t *handleptr, uint32_t home_node,
+starpu_coo_data_register(starpu_data_handle_t *handleptr, unsigned home_node,
 			 uint32_t nx, uint32_t ny, uint32_t n_values,
 			 uint32_t *columns, uint32_t *rows,
 			 uintptr_t values, size_t elemsize)

+ 7 - 7
src/datawizard/interfaces/csr_interface.c

@@ -64,9 +64,9 @@ static struct starpu_data_copy_methods csr_copy_data_methods_s =
 #endif
 };
 
-static void register_csr_handle(starpu_data_handle_t handle, uint32_t home_node, void *data_interface);
-static ssize_t allocate_csr_buffer_on_node(void *data_interface_, uint32_t dst_node);
-static void free_csr_buffer_on_node(void *data_interface, uint32_t node);
+static void register_csr_handle(starpu_data_handle_t handle, unsigned home_node, void *data_interface);
+static ssize_t allocate_csr_buffer_on_node(void *data_interface_, unsigned dst_node);
+static void free_csr_buffer_on_node(void *data_interface, unsigned node);
 static size_t csr_interface_get_size(starpu_data_handle_t handle);
 static int csr_compare(void *data_interface_a, void *data_interface_b);
 static uint32_t footprint_csr_interface_crc32(starpu_data_handle_t handle);
@@ -84,7 +84,7 @@ static struct starpu_data_interface_ops interface_csr_ops =
 	.compare = csr_compare,
 };
 
-static void register_csr_handle(starpu_data_handle_t handle, uint32_t home_node, void *data_interface)
+static void register_csr_handle(starpu_data_handle_t handle, unsigned home_node, void *data_interface)
 {
 	struct starpu_csr_interface *csr_interface = (struct starpu_csr_interface *) data_interface;
 
@@ -115,7 +115,7 @@ static void register_csr_handle(starpu_data_handle_t handle, uint32_t home_node,
 }
 
 /* declare a new data with the BLAS interface */
-void starpu_csr_data_register(starpu_data_handle_t *handleptr, uint32_t home_node,
+void starpu_csr_data_register(starpu_data_handle_t *handleptr, unsigned home_node,
 		uint32_t nnz, uint32_t nrow, uintptr_t nzval, uint32_t *colind, uint32_t *rowptr, uint32_t firstentry, size_t elemsize)
 {
 	struct starpu_csr_interface csr_interface =
@@ -236,7 +236,7 @@ static size_t csr_interface_get_size(starpu_data_handle_t handle)
 /* memory allocation/deallocation primitives for the BLAS interface */
 
 /* returns the size of the allocated area */
-static ssize_t allocate_csr_buffer_on_node(void *data_interface_, uint32_t dst_node)
+static ssize_t allocate_csr_buffer_on_node(void *data_interface_, unsigned dst_node)
 {
 	uintptr_t addr_nzval = 0;
 	uint32_t *addr_colind = NULL, *addr_rowptr = NULL;
@@ -279,7 +279,7 @@ fail_nzval:
 	return -ENOMEM;
 }
 
-static void free_csr_buffer_on_node(void *data_interface, uint32_t node)
+static void free_csr_buffer_on_node(void *data_interface, unsigned node)
 {
 	struct starpu_csr_interface *csr_interface = (struct starpu_csr_interface *) data_interface;
 	uint32_t nnz = csr_interface->nnz;

+ 3 - 3
src/datawizard/interfaces/data_interface.c

@@ -104,7 +104,7 @@ _starpu_data_is_multiformat_handle(starpu_data_handle_t handle)
  */
 
 static void _starpu_register_new_data(starpu_data_handle_t handle,
-					uint32_t home_node, uint32_t wt_mask)
+					unsigned home_node, uint32_t wt_mask)
 {
 	void *ptr;
 
@@ -281,7 +281,7 @@ starpu_data_handle_t _starpu_data_handle_allocate(struct starpu_data_interface_o
 	return handle;
 }
 
-void starpu_data_register(starpu_data_handle_t *handleptr, uint32_t home_node,
+void starpu_data_register(starpu_data_handle_t *handleptr, unsigned home_node,
 			  void *data_interface,
 			  struct starpu_data_interface_ops *ops)
 {
@@ -338,7 +338,7 @@ void starpu_data_register_same(starpu_data_handle_t *handledst, starpu_data_hand
 	starpu_data_register(handledst, -1, local_interface, handlesrc->ops);
 }
 
-void *starpu_handle_to_pointer(starpu_data_handle_t handle, uint32_t node)
+void *starpu_handle_to_pointer(starpu_data_handle_t handle, unsigned node)
 {
 	/* Check whether the operation is supported and the node has actually
 	 * been allocated.  */

+ 9 - 9
src/datawizard/interfaces/matrix_interface.c

@@ -74,10 +74,10 @@ static struct starpu_data_copy_methods matrix_copy_data_methods_s =
 #endif
 };
 
-static void register_matrix_handle(starpu_data_handle_t handle, uint32_t home_node, void *data_interface);
-static void *matrix_handle_to_pointer(starpu_data_handle_t data_handle, uint32_t node);
-static ssize_t allocate_matrix_buffer_on_node(void *data_interface_, uint32_t dst_node);
-static void free_matrix_buffer_on_node(void *data_interface, uint32_t node);
+static void register_matrix_handle(starpu_data_handle_t handle, unsigned home_node, void *data_interface);
+static void *matrix_handle_to_pointer(starpu_data_handle_t data_handle, unsigned node);
+static ssize_t allocate_matrix_buffer_on_node(void *data_interface_, unsigned dst_node);
+static void free_matrix_buffer_on_node(void *data_interface, unsigned node);
 static size_t matrix_interface_get_size(starpu_data_handle_t handle);
 static uint32_t footprint_matrix_interface_crc32(starpu_data_handle_t handle);
 static int matrix_compare(void *data_interface_a, void *data_interface_b);
@@ -98,7 +98,7 @@ struct starpu_data_interface_ops starpu_interface_matrix_ops =
 	.display = display_matrix_interface,
 };
 
-static void register_matrix_handle(starpu_data_handle_t handle, uint32_t home_node, void *data_interface)
+static void register_matrix_handle(starpu_data_handle_t handle, unsigned home_node, void *data_interface)
 {
 	struct starpu_matrix_interface *matrix_interface = (struct starpu_matrix_interface *) data_interface;
 
@@ -129,7 +129,7 @@ static void register_matrix_handle(starpu_data_handle_t handle, uint32_t home_no
 	}
 }
 
-static void *matrix_handle_to_pointer(starpu_data_handle_t handle, uint32_t node)
+static void *matrix_handle_to_pointer(starpu_data_handle_t handle, unsigned node)
 {
 	STARPU_ASSERT(starpu_data_test_if_allocated_on_node(handle, node));
 
@@ -141,7 +141,7 @@ static void *matrix_handle_to_pointer(starpu_data_handle_t handle, uint32_t node
 
 
 /* declare a new data with the matrix interface */
-void starpu_matrix_data_register(starpu_data_handle_t *handleptr, uint32_t home_node,
+void starpu_matrix_data_register(starpu_data_handle_t *handleptr, unsigned home_node,
 			uintptr_t ptr, uint32_t ld, uint32_t nx,
 			uint32_t ny, size_t elemsize)
 {
@@ -248,7 +248,7 @@ size_t starpu_matrix_get_elemsize(starpu_data_handle_t handle)
 /* memory allocation/deallocation primitives for the matrix interface */
 
 /* returns the size of the allocated area */
-static ssize_t allocate_matrix_buffer_on_node(void *data_interface_, uint32_t dst_node)
+static ssize_t allocate_matrix_buffer_on_node(void *data_interface_, unsigned dst_node)
 {
 	uintptr_t addr = 0, handle;
 
@@ -280,7 +280,7 @@ static ssize_t allocate_matrix_buffer_on_node(void *data_interface_, uint32_t ds
 	return allocated_memory;
 }
 
-static void free_matrix_buffer_on_node(void *data_interface, uint32_t node)
+static void free_matrix_buffer_on_node(void *data_interface, unsigned node)
 {
 	struct starpu_matrix_interface *matrix_interface = (struct starpu_matrix_interface *) data_interface;
 	uint32_t nx = matrix_interface->nx;

+ 9 - 9
src/datawizard/interfaces/multiformat_interface.c

@@ -67,10 +67,10 @@ static struct starpu_data_copy_methods multiformat_copy_data_methods_s =
 #endif
 };
 
-static void register_multiformat_handle(starpu_data_handle_t handle, uint32_t home_node, void *data_interface);
-static ssize_t allocate_multiformat_buffer_on_node(void *data_interface_, uint32_t dst_node);
-static void *multiformat_handle_to_pointer(starpu_data_handle_t data_handle, uint32_t node);
-static void free_multiformat_buffer_on_node(void *data_interface, uint32_t node);
+static void register_multiformat_handle(starpu_data_handle_t handle, unsigned home_node, void *data_interface);
+static ssize_t allocate_multiformat_buffer_on_node(void *data_interface_, unsigned dst_node);
+static void *multiformat_handle_to_pointer(starpu_data_handle_t data_handle, unsigned node);
+static void free_multiformat_buffer_on_node(void *data_interface, unsigned node);
 static size_t multiformat_interface_get_size(starpu_data_handle_t handle);
 static uint32_t footprint_multiformat_interface_crc32(starpu_data_handle_t handle);
 static int multiformat_compare(void *data_interface_a, void *data_interface_b);
@@ -103,7 +103,7 @@ static struct starpu_data_interface_ops interface_multiformat_ops =
 	.get_mf_ops            = get_mf_ops
 };
 
-static void *multiformat_handle_to_pointer(starpu_data_handle_t handle, uint32_t node)
+static void *multiformat_handle_to_pointer(starpu_data_handle_t handle, unsigned node)
 {
 	STARPU_ASSERT(starpu_data_test_if_allocated_on_node(handle, node));
 	struct starpu_multiformat_interface *multiformat_interface =
@@ -127,7 +127,7 @@ static void *multiformat_handle_to_pointer(starpu_data_handle_t handle, uint32_t
 	return NULL;
 }
 
-static void register_multiformat_handle(starpu_data_handle_t handle, uint32_t home_node, void *data_interface)
+static void register_multiformat_handle(starpu_data_handle_t handle, unsigned home_node, void *data_interface)
 {
 	struct starpu_multiformat_interface *multiformat_interface;
 	multiformat_interface = (struct starpu_multiformat_interface *) data_interface;
@@ -164,7 +164,7 @@ static void register_multiformat_handle(starpu_data_handle_t handle, uint32_t ho
 }
 
 void starpu_multiformat_data_register(starpu_data_handle_t *handleptr,
-				      uint32_t home_node,
+				      unsigned home_node,
 				      void *ptr,
 				      uint32_t nobjects,
 				      struct starpu_multiformat_data_interface_ops *format_ops)
@@ -233,7 +233,7 @@ uint32_t starpu_multiformat_get_nx(starpu_data_handle_t handle)
 	return multiformat_interface->nx;
 }
 
-static ssize_t allocate_multiformat_buffer_on_node(void *data_interface_, uint32_t dst_node)
+static ssize_t allocate_multiformat_buffer_on_node(void *data_interface_, unsigned dst_node)
 {
 	struct starpu_multiformat_interface *multiformat_interface;
 	multiformat_interface = (struct starpu_multiformat_interface *) data_interface_;
@@ -280,7 +280,7 @@ fail_cpu:
 	return -ENOMEM;
 }
 
-static void free_multiformat_buffer_on_node(void *data_interface, uint32_t node)
+static void free_multiformat_buffer_on_node(void *data_interface, unsigned node)
 {
 	struct starpu_multiformat_interface *multiformat_interface;
 	multiformat_interface = (struct starpu_multiformat_interface *) data_interface;

+ 9 - 9
src/datawizard/interfaces/variable_interface.c

@@ -67,10 +67,10 @@ static struct starpu_data_copy_methods variable_copy_data_methods_s =
 #endif
 };
 
-static void register_variable_handle(starpu_data_handle_t handle, uint32_t home_node, void *data_interface);
-static ssize_t allocate_variable_buffer_on_node(void *data_interface_, uint32_t dst_node);
-static void *variable_handle_to_pointer(starpu_data_handle_t data_handle, uint32_t node);
-static void free_variable_buffer_on_node(void *data_interface, uint32_t node);
+static void register_variable_handle(starpu_data_handle_t handle, unsigned home_node, void *data_interface);
+static ssize_t allocate_variable_buffer_on_node(void *data_interface_, unsigned dst_node);
+static void *variable_handle_to_pointer(starpu_data_handle_t data_handle, unsigned node);
+static void free_variable_buffer_on_node(void *data_interface, unsigned node);
 static size_t variable_interface_get_size(starpu_data_handle_t handle);
 static uint32_t footprint_variable_interface_crc32(starpu_data_handle_t handle);
 static int variable_compare(void *data_interface_a, void *data_interface_b);
@@ -91,14 +91,14 @@ static struct starpu_data_interface_ops interface_variable_ops =
 	.display = display_variable_interface,
 };
 
-static void *variable_handle_to_pointer(starpu_data_handle_t handle, uint32_t node)
+static void *variable_handle_to_pointer(starpu_data_handle_t handle, unsigned node)
 {
 	STARPU_ASSERT(starpu_data_test_if_allocated_on_node(handle, node));
 
 	return (void*) STARPU_VARIABLE_GET_PTR(starpu_data_get_interface_on_node(handle, node));
 }
 
-static void register_variable_handle(starpu_data_handle_t handle, uint32_t home_node, void *data_interface)
+static void register_variable_handle(starpu_data_handle_t handle, unsigned home_node, void *data_interface)
 {
 	unsigned node;
 	for (node = 0; node < STARPU_MAXNODES; node++)
@@ -120,7 +120,7 @@ static void register_variable_handle(starpu_data_handle_t handle, uint32_t home_
 }
 
 /* declare a new data with the variable interface */
-void starpu_variable_data_register(starpu_data_handle_t *handleptr, uint32_t home_node,
+void starpu_variable_data_register(starpu_data_handle_t *handleptr, unsigned home_node,
                         uintptr_t ptr, size_t elemsize)
 {
 	struct starpu_variable_interface variable =
@@ -181,7 +181,7 @@ size_t starpu_variable_get_elemsize(starpu_data_handle_t handle)
 /* memory allocation/deallocation primitives for the variable interface */
 
 /* returns the size of the allocated area */
-static ssize_t allocate_variable_buffer_on_node(void *data_interface_, uint32_t dst_node)
+static ssize_t allocate_variable_buffer_on_node(void *data_interface_, unsigned dst_node)
 {
 	struct starpu_variable_interface *variable_interface = (struct starpu_variable_interface *) data_interface_;
 	size_t elemsize = variable_interface->elemsize;
@@ -196,7 +196,7 @@ static ssize_t allocate_variable_buffer_on_node(void *data_interface_, uint32_t
 	return elemsize;
 }
 
-static void free_variable_buffer_on_node(void *data_interface, uint32_t node)
+static void free_variable_buffer_on_node(void *data_interface, unsigned node)
 {
 	struct starpu_variable_interface *variable_interface = (struct starpu_variable_interface *) data_interface;
 	starpu_free_buffer_on_node(node, variable_interface->ptr, variable_interface->elemsize);

+ 9 - 9
src/datawizard/interfaces/vector_interface.c

@@ -67,10 +67,10 @@ static struct starpu_data_copy_methods vector_copy_data_methods_s =
 #endif
 };
 
-static void register_vector_handle(starpu_data_handle_t handle, uint32_t home_node, void *data_interface);
-static ssize_t allocate_vector_buffer_on_node(void *data_interface_, uint32_t dst_node);
-static void *vector_handle_to_pointer(starpu_data_handle_t data_handle, uint32_t node);
-static void free_vector_buffer_on_node(void *data_interface, uint32_t node);
+static void register_vector_handle(starpu_data_handle_t handle, unsigned home_node, void *data_interface);
+static ssize_t allocate_vector_buffer_on_node(void *data_interface_, unsigned dst_node);
+static void *vector_handle_to_pointer(starpu_data_handle_t data_handle, unsigned node);
+static void free_vector_buffer_on_node(void *data_interface, unsigned node);
 static size_t vector_interface_get_size(starpu_data_handle_t handle);
 static uint32_t footprint_vector_interface_crc32(starpu_data_handle_t handle);
 static int vector_compare(void *data_interface_a, void *data_interface_b);
@@ -91,7 +91,7 @@ static struct starpu_data_interface_ops interface_vector_ops =
 	.display = display_vector_interface,
 };
 
-static void *vector_handle_to_pointer(starpu_data_handle_t handle, uint32_t node)
+static void *vector_handle_to_pointer(starpu_data_handle_t handle, unsigned node)
 {
 	STARPU_ASSERT(starpu_data_test_if_allocated_on_node(handle, node));
 
@@ -101,7 +101,7 @@ static void *vector_handle_to_pointer(starpu_data_handle_t handle, uint32_t node
 	return (void*) vector_interface->ptr;
 }
 
-static void register_vector_handle(starpu_data_handle_t handle, uint32_t home_node, void *data_interface)
+static void register_vector_handle(starpu_data_handle_t handle, unsigned home_node, void *data_interface)
 {
 	struct starpu_vector_interface *vector_interface = (struct starpu_vector_interface *) data_interface;
 
@@ -130,7 +130,7 @@ static void register_vector_handle(starpu_data_handle_t handle, uint32_t home_no
 }
 
 /* declare a new data with the vector interface */
-void starpu_vector_data_register(starpu_data_handle_t *handleptr, uint32_t home_node,
+void starpu_vector_data_register(starpu_data_handle_t *handleptr, unsigned home_node,
                         uintptr_t ptr, uint32_t nx, size_t elemsize)
 {
 	struct starpu_vector_interface vector =
@@ -213,7 +213,7 @@ size_t starpu_vector_get_elemsize(starpu_data_handle_t handle)
 /* memory allocation/deallocation primitives for the vector interface */
 
 /* returns the size of the allocated area */
-static ssize_t allocate_vector_buffer_on_node(void *data_interface_, uint32_t dst_node)
+static ssize_t allocate_vector_buffer_on_node(void *data_interface_, unsigned dst_node)
 {
 	uintptr_t addr = 0, handle;
 
@@ -241,7 +241,7 @@ static ssize_t allocate_vector_buffer_on_node(void *data_interface_, uint32_t ds
 	return allocated_memory;
 }
 
-static void free_vector_buffer_on_node(void *data_interface, uint32_t node)
+static void free_vector_buffer_on_node(void *data_interface, unsigned node)
 {
 	struct starpu_vector_interface *vector_interface = (struct starpu_vector_interface *) data_interface;
 	uint32_t nx = vector_interface->nx;

+ 6 - 6
src/datawizard/interfaces/void_interface.c

@@ -57,9 +57,9 @@ static struct starpu_data_copy_methods void_copy_data_methods_s =
 #endif
 };
 
-static void register_void_handle(starpu_data_handle_t handle, uint32_t home_node, void *data_interface);
-static ssize_t allocate_void_buffer_on_node(void *data_interface_, uint32_t dst_node);
-static void free_void_buffer_on_node(void *data_interface, uint32_t node);
+static void register_void_handle(starpu_data_handle_t handle, unsigned home_node, void *data_interface);
+static ssize_t allocate_void_buffer_on_node(void *data_interface_, unsigned dst_node);
+static void free_void_buffer_on_node(void *data_interface, unsigned node);
 static size_t void_interface_get_size(starpu_data_handle_t handle);
 static uint32_t footprint_void_interface_crc32(starpu_data_handle_t handle);
 static int void_compare(void *data_interface_a, void *data_interface_b);
@@ -80,7 +80,7 @@ static struct starpu_data_interface_ops interface_void_ops =
 };
 
 static void register_void_handle(starpu_data_handle_t handle STARPU_ATTRIBUTE_UNUSED,
-				uint32_t home_node STARPU_ATTRIBUTE_UNUSED,
+				unsigned home_node STARPU_ATTRIBUTE_UNUSED,
 				void *data_interface STARPU_ATTRIBUTE_UNUSED)
 {
 	/* Since there is no real data to register, we don't do anything */
@@ -120,14 +120,14 @@ static size_t void_interface_get_size(starpu_data_handle_t handle STARPU_ATTRIBU
 
 /* returns the size of the allocated area */
 static ssize_t allocate_void_buffer_on_node(void *data_interface STARPU_ATTRIBUTE_UNUSED,
-					uint32_t dst_node STARPU_ATTRIBUTE_UNUSED)
+					unsigned dst_node STARPU_ATTRIBUTE_UNUSED)
 {
 	/* Successfuly allocated 0 bytes */
 	return 0;
 }
 
 static void free_void_buffer_on_node(void *data_interface STARPU_ATTRIBUTE_UNUSED ,
-					uint32_t node STARPU_ATTRIBUTE_UNUSED)
+					unsigned node STARPU_ATTRIBUTE_UNUSED)
 {
 	/* There is no buffer actually */
 }

+ 10 - 10
src/datawizard/memalloc.c

@@ -217,7 +217,7 @@ static void transfer_subtree_to_node(starpu_data_handle_t handle, unsigned src_n
 	}
 }
 
-static size_t free_memory_on_node(struct _starpu_mem_chunk *mc, uint32_t node)
+static size_t free_memory_on_node(struct _starpu_mem_chunk *mc, unsigned node)
 {
 	size_t freed = 0;
 
@@ -457,7 +457,7 @@ static int _starpu_data_interface_compare(void *data_interface_a, struct starpu_
 }
 
 /* This function must be called with mc_rwlock[node] taken in write mode */
-static struct _starpu_mem_chunk *_starpu_memchunk_cache_lookup_locked(uint32_t node, starpu_data_handle_t handle)
+static struct _starpu_mem_chunk *_starpu_memchunk_cache_lookup_locked(unsigned node, starpu_data_handle_t handle)
 {
 	uint32_t footprint = _starpu_compute_data_footprint(handle);
 
@@ -527,7 +527,7 @@ static unsigned try_to_find_reusable_mem_chunk(unsigned node, starpu_data_handle
  * Free the memory chuncks that are explicitely tagged to be freed. The
  * mc_rwlock[node] rw-lock should be taken prior to calling this function.
  */
-static size_t flush_memchunk_cache(uint32_t node, size_t reclaim)
+static size_t flush_memchunk_cache(unsigned node, size_t reclaim)
 {
 	struct _starpu_mem_chunk *mc, *next_mc;
 
@@ -558,7 +558,7 @@ static size_t flush_memchunk_cache(uint32_t node, size_t reclaim)
  * should only be used at the termination of StarPU for instance). The
  * mc_rwlock[node] rw-lock should be taken prior to calling this function.
  */
-static size_t free_potentially_in_use_mc(uint32_t node, unsigned force, size_t reclaim)
+static size_t free_potentially_in_use_mc(unsigned node, unsigned force, size_t reclaim)
 {
 	size_t freed = 0;
 
@@ -592,7 +592,7 @@ static size_t free_potentially_in_use_mc(uint32_t node, unsigned force, size_t r
 	return freed;
 }
 
-static size_t reclaim_memory_generic(uint32_t node, unsigned force, size_t reclaim)
+static size_t reclaim_memory_generic(unsigned node, unsigned force, size_t reclaim)
 {
 	size_t freed = 0;
 
@@ -618,7 +618,7 @@ static size_t reclaim_memory_generic(uint32_t node, unsigned force, size_t recla
  * (for the data replicates). This is not ensuring data coherency, and should
  * only be called while StarPU is getting shut down.
  */
-size_t _starpu_free_all_automatically_allocated_buffers(uint32_t node)
+size_t _starpu_free_all_automatically_allocated_buffers(unsigned node)
 {
 	return reclaim_memory_generic(node, 1, 0);
 }
@@ -765,7 +765,7 @@ static _starpu_pthread_mutex_t opencl_alloc_mutex = _STARPU_PTHREAD_MUTEX_INITIA
 #endif
 
 uintptr_t
-starpu_allocate_buffer_on_node(uint32_t dst_node, size_t size)
+starpu_allocate_buffer_on_node(unsigned dst_node, size_t size)
 {
 	uintptr_t addr = 0;
 
@@ -860,7 +860,7 @@ starpu_allocate_buffer_on_node(uint32_t dst_node, size_t size)
 }
 
 void
-starpu_free_buffer_on_node(uint32_t dst_node, uintptr_t addr, size_t size)
+starpu_free_buffer_on_node(unsigned dst_node, uintptr_t addr, size_t size)
 {
 	enum starpu_node_kind kind = starpu_node_get_kind(dst_node);
 	switch(kind)
@@ -925,7 +925,7 @@ starpu_free_buffer_on_node(uint32_t dst_node, uintptr_t addr, size_t size)
  *
  */
 
-static ssize_t _starpu_allocate_interface(starpu_data_handle_t handle, struct _starpu_data_replicate *replicate, uint32_t dst_node, unsigned is_prefetch)
+static ssize_t _starpu_allocate_interface(starpu_data_handle_t handle, struct _starpu_data_replicate *replicate, unsigned dst_node, unsigned is_prefetch)
 {
 	unsigned attempts = 0;
 	ssize_t allocated_memory;
@@ -1050,7 +1050,7 @@ int _starpu_allocate_memory_on_node(starpu_data_handle_t handle, struct _starpu_
 	return 0;
 }
 
-unsigned starpu_data_test_if_allocated_on_node(starpu_data_handle_t handle, uint32_t memory_node)
+unsigned starpu_data_test_if_allocated_on_node(starpu_data_handle_t handle, unsigned memory_node)
 {
 	return handle->per_node[memory_node].allocated;
 }

+ 2 - 2
src/datawizard/memalloc.h

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2009, 2010, 2012  Université de Bordeaux 1
- * Copyright (C) 2010, 2011, 2012  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010, 2011, 2012, 2013  Centre National de la Recherche Scientifique
  *
  * StarPU is free software; you can redistribute it and/or modify
  * it under the terms of the GNU Lesser General Public License as published by
@@ -65,7 +65,7 @@ void _starpu_init_mem_chunk_lists(void);
 void _starpu_deinit_mem_chunk_lists(void);
 void _starpu_request_mem_chunk_removal(starpu_data_handle_t handle, unsigned node, int handle_deleted);
 int _starpu_allocate_memory_on_node(starpu_data_handle_t handle, struct _starpu_data_replicate *replicate, unsigned is_prefetch);
-size_t _starpu_free_all_automatically_allocated_buffers(uint32_t node);
+size_t _starpu_free_all_automatically_allocated_buffers(unsigned node);
 void _starpu_memchunk_recently_used(struct _starpu_mem_chunk *mc, unsigned node);
 
 void _starpu_display_memory_stats_by_node(int node);

+ 2 - 2
src/datawizard/memory_nodes.c

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2009-2013  Université de Bordeaux 1
- * Copyright (C) 2010, 2011, 2012  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010, 2011, 2012, 2013  Centre National de la Recherche Scientifique
  *
  * StarPU is free software; you can redistribute it and/or modify
  * it under the terms of the GNU Lesser General Public License as published by
@@ -91,7 +91,7 @@ struct _starpu_memory_node_descr *_starpu_memory_node_get_description(void)
 	return &descr;
 }
 
-enum starpu_node_kind starpu_node_get_kind(uint32_t node)
+enum starpu_node_kind starpu_node_get_kind(unsigned node)
 {
 	return descr.nodes[node];
 }

+ 2 - 2
src/datawizard/progress.c

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2009, 2010, 2012-2013  Université de Bordeaux 1
- * Copyright (C) 2010, 2011  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010, 2011, 2013  Centre National de la Recherche Scientifique
  *
  * StarPU is free software; you can redistribute it and/or modify
  * it under the terms of the GNU Lesser General Public License as published by
@@ -23,7 +23,7 @@
 #include <msg/msg.h>
 #endif
 
-void _starpu_datawizard_progress(uint32_t memory_node, unsigned may_alloc)
+void _starpu_datawizard_progress(unsigned memory_node, unsigned may_alloc)
 {
 #ifdef STARPU_SIMGRID
 #if STARPU_DEVEL

+ 1 - 1
src/datawizard/reduction.c

@@ -137,7 +137,7 @@ void _starpu_data_end_reduction_mode(starpu_data_handle_t handle)
 			/* Make sure the replicate is not removed */
 			handle->per_worker[worker].refcnt++;
 
-			uint32_t home_node = starpu_worker_get_memory_node(worker);
+			unsigned home_node = starpu_worker_get_memory_node(worker);
 			starpu_data_register(&handle->reduction_tmp_handles[worker],
 				home_node, handle->per_worker[worker].data_interface, handle->ops);
 

+ 1 - 1
src/datawizard/user_interactions.c

@@ -26,7 +26,7 @@
 
 /* Explicitly ask StarPU to allocate room for a piece of data on the specified
  * memory node. */
-int starpu_data_request_allocation(starpu_data_handle_t handle, uint32_t node)
+int starpu_data_request_allocation(starpu_data_handle_t handle, unsigned node)
 {
 	struct _starpu_data_request *r;
 

+ 3 - 3
src/datawizard/write_back.c

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2009-2012  Université de Bordeaux 1
- * Copyright (C) 2010, 2011, 2012  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010, 2011, 2012, 2013  Centre National de la Recherche Scientifique
  *
  * StarPU is free software; you can redistribute it and/or modify
  * it under the terms of the GNU Lesser General Public License as published by
@@ -28,7 +28,7 @@ static void wt_callback(void *arg)
 		_starpu_spin_unlock(&handle->header_lock);
 }
 
-void _starpu_write_through_data(starpu_data_handle_t handle, uint32_t requesting_node,
+void _starpu_write_through_data(starpu_data_handle_t handle, unsigned requesting_node,
 				uint32_t write_through_mask)
 {
 	if ((write_through_mask & ~(1<<requesting_node)) == 0)
@@ -38,7 +38,7 @@ void _starpu_write_through_data(starpu_data_handle_t handle, uint32_t requesting
 	}
 
 	/* first commit all changes onto the nodes specified by the mask */
-	uint32_t node, max;
+	unsigned node, max;
 	for (node = 0, max = starpu_memory_nodes_get_count(); node < max; node++)
 	{
 		if (write_through_mask & (1<<node))

+ 2 - 2
src/datawizard/write_back.h

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2009, 2010  Université de Bordeaux 1
- * Copyright (C) 2010, 2011  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010, 2011, 2013  Centre National de la Recherche Scientifique
  *
  * StarPU is free software; you can redistribute it and/or modify
  * it under the terms of the GNU Lesser General Public License as published by
@@ -24,7 +24,7 @@
 /* If a write-through mask is associated to that data handle, this propagates
  * the the current value of the data onto the different memory nodes in the
  * write_through_mask. */
-void _starpu_write_through_data(starpu_data_handle_t handle, uint32_t requesting_node,
+void _starpu_write_through_data(starpu_data_handle_t handle, unsigned requesting_node,
 					   uint32_t write_through_mask);
 
 #endif // __DW_WRITE_BACK_H__

+ 2 - 2
src/drivers/gordon/driver_gordon.c

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2009, 2010, 2011-2012  Université de Bordeaux 1
- * Copyright (C) 2010, 2011  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010, 2011, 2013  Centre National de la Recherche Scientifique
  * Copyright (C) 2011  Télécom-SudParis
  *
  * StarPU is free software; you can redistribute it and/or modify
@@ -80,7 +80,7 @@ void *gordon_worker_progress(void *arg)
 	return NULL;
 }
 
-static void starpu_to_gordon_buffers(struct _starpu_job *j, struct gordon_ppu_job_s *gordon_job, uint32_t memory_node)
+static void starpu_to_gordon_buffers(struct _starpu_job *j, struct gordon_ppu_job_s *gordon_job, unsigned memory_node)
 {
 	unsigned buffer;
 	unsigned nin = 0, ninout = 0, nout = 0;

+ 2 - 2
src/sched_policies/deque_modeling_policy_data_aware.c

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2010-2013  Université de Bordeaux 1
- * Copyright (C) 2010, 2011, 2012  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010, 2011, 2012, 2013  Centre National de la Recherche Scientifique
  * Copyright (C) 2011  Télécom-SudParis
  * Copyright (C) 2011-2012  INRIA
  *
@@ -70,7 +70,7 @@ static const float idle_power_minimum=0;
 static const float idle_power_maximum=10000.0;
 #endif /* !STARPU_USE_TOP */
 
-static int count_non_ready_buffers(struct starpu_task *task, uint32_t node)
+static int count_non_ready_buffers(struct starpu_task *task, unsigned node)
 {
 	int cnt = 0;
 	unsigned nbuffers = task->cl->nbuffers;

+ 3 - 3
tests/microbenchs/local_pingpong.c

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2010  Université de Bordeaux 1
- * Copyright (C) 2010, 2011, 2012  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010, 2011, 2012, 2013  Centre National de la Recherche Scientifique
  *
  * StarPU is free software; you can redistribute it and/or modify
  * it under the terms of the GNU Lesser General Public License as published by
@@ -36,8 +36,8 @@ static unsigned *v;
 
 static char worker_0_name[128];
 static char worker_1_name[128];
-static uint32_t memory_node_0;
-static uint32_t memory_node_1;
+static unsigned memory_node_0;
+static unsigned memory_node_1;
 
 struct timeval start;
 struct timeval end;