瀏覽代碼

Use starpu_ssize_t instead of ssize_t, and add a check against it

Samuel Thibault 10 年之前
父節點
當前提交
923dbdd2d8

+ 5 - 0
Makefile.am

@@ -107,6 +107,11 @@ if STARPU_DEVEL
 		echo "Please do not include sys/time, it is not available on Windows, include starpu_util.h and use starpu_timing_now() instead" ; \
 		false ; \
 	fi
+	@if grep -re '\<ssize_t' $$( find $(srcdir)/examples $(srcdir)/tests $(srcdir)/src $(srcdir)/mpi/src $(srcdir)/include -name \*.[ch] -a \! -name starpu_config.h ) ; \
+	then \
+		echo "Please do not use ssize_t, it is not available on Windows, use starpu_ssize_t instead"; \
+		false ; \
+	fi
 endif
 clean-local:
 	cd starpu-top ; $(QMAKE) ; $(MAKE) clean ; $(RM) Makefile

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

@@ -69,7 +69,7 @@ static const struct starpu_data_copy_methods custom_copy_data_methods_s =
 static void     register_custom_handle(starpu_data_handle_t handle,
 				       unsigned home_node,
 				       void *data_interface);
-static ssize_t  allocate_custom_buffer_on_node(void *data_interface_,
+static starpu_ssize_t  allocate_custom_buffer_on_node(void *data_interface_,
 					       unsigned dst_node);
 static void*    custom_handle_to_pointer(starpu_data_handle_t data_handle,
 					 unsigned node);
@@ -143,9 +143,9 @@ register_custom_handle(starpu_data_handle_t handle, unsigned home_node, void *da
 	}
 }
 
-static ssize_t allocate_custom_buffer_on_node(void *data_interface, unsigned node)
+static starpu_ssize_t allocate_custom_buffer_on_node(void *data_interface, unsigned node)
 {
-	ssize_t size = 0;
+	starpu_ssize_t size = 0;
 	struct custom_data_interface *custom_interface;
 	custom_interface = (struct custom_data_interface *) data_interface;
 
@@ -294,7 +294,7 @@ copy_cuda_common_async(void *src_interface, unsigned src_node,
 	src_custom = (struct custom_data_interface *) src_interface;
 	dst_custom = (struct custom_data_interface *) dst_interface;
 
-	ssize_t size = 0;
+	starpu_ssize_t size = 0;
 	cudaError_t err;
 
 	switch (kind)
@@ -402,7 +402,7 @@ static int copy_ram_to_opencl_async(void *src_interface, unsigned src_node,
 				    void *dst_interface, unsigned dst_node,
 				    cl_event *event)
 {
-	ssize_t size;
+	starpu_ssize_t size;
 	struct custom_data_interface *src_custom, *dst_custom;
 
 	src_custom = (struct custom_data_interface *) src_interface;
@@ -445,7 +445,7 @@ static int copy_opencl_to_ram_async(void *src_interface, unsigned src_node,
 				    void *dst_interface, unsigned dst_node,
 				    cl_event *event)
 {
-	ssize_t size;
+	starpu_ssize_t size;
 	struct custom_data_interface *src_custom, *dst_custom;
 
 	src_custom = (struct custom_data_interface *) src_interface;

+ 1 - 1
examples/filters/custom_mf/custom_mf_filter.c

@@ -68,7 +68,7 @@ custom_filter(void *father, void *child, struct starpu_data_filter *f,
 	custom_child = (struct custom_data_interface *) child;
 
 	assert(N % nchunks == 0); // XXX 
-	ssize_t chunk_size = N/nchunks;
+	starpu_ssize_t chunk_size = N/nchunks;
 
 	if (custom_father->cpu_ptr)
 	{

+ 4 - 4
examples/interface/complex_interface.c

@@ -72,7 +72,7 @@ static starpu_ssize_t complex_allocate_data_on_node(void *data_interface, unsign
 
 	double *addr_real = 0;
 	double *addr_imaginary = 0;
-	ssize_t requested_memory = complex_interface->nx * sizeof(complex_interface->real[0]);
+	starpu_ssize_t requested_memory = complex_interface->nx * sizeof(complex_interface->real[0]);
 
 	addr_real = (double*) starpu_malloc_on_node(node, requested_memory);
 	if (!addr_real)
@@ -96,7 +96,7 @@ fail_real:
 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]);
+	starpu_ssize_t requested_memory = complex_interface->nx * sizeof(complex_interface->real[0]);
 
 	starpu_free_on_node(node, (uintptr_t) complex_interface->real, requested_memory);
 	starpu_free_on_node(node, (uintptr_t) complex_interface->imaginary, requested_memory);
@@ -126,7 +126,7 @@ static void *complex_handle_to_pointer(starpu_data_handle_t handle, unsigned nod
 	return (void*) complex_interface->real;
 }
 
-static int complex_pack_data(starpu_data_handle_t handle, unsigned node, void **ptr, ssize_t *count)
+static int complex_pack_data(starpu_data_handle_t handle, unsigned node, void **ptr, starpu_ssize_t *count)
 {
 	STARPU_ASSERT(starpu_data_test_if_allocated_on_node(handle, node));
 
@@ -161,7 +161,7 @@ static int complex_unpack_data(starpu_data_handle_t handle, unsigned node, void
 	return 0;
 }
 
-static ssize_t complex_describe(void *data_interface, char *buf, size_t size)
+static starpu_ssize_t complex_describe(void *data_interface, char *buf, size_t size)
 {
 	struct starpu_complex_interface *complex_interface = (struct starpu_complex_interface *) data_interface;
 	return snprintf(buf, size, "Complex%d", complex_interface->nx);

+ 3 - 2
include/starpu_disk.h

@@ -19,11 +19,12 @@
 #define __STARPU_DISK_H__
 
 #include <sys/types.h>
+#include <starpu_config.h>
 
 /* list of functions to use on disk */
 struct starpu_disk_ops
 {
-	 void *  (*plug)   (void *parameter, ssize_t size);
+	 void *  (*plug)   (void *parameter, starpu_ssize_t size);
 	 void    (*unplug) (void *base);
 
 	 int    (*bandwidth)    (unsigned node);
@@ -64,6 +65,6 @@ void starpu_disk_close(unsigned node, void *obj, size_t size);
 
 void *starpu_disk_open(unsigned node, void *pos, size_t size);
 
-int starpu_disk_register(struct starpu_disk_ops *func, void *parameter, ssize_t size);
+int starpu_disk_register(struct starpu_disk_ops *func, void *parameter, starpu_ssize_t size);
 
 #endif /* __STARPU_DISK_H__ */

+ 1 - 1
mpi/examples/mpi_lu/plu_outofcore_example.c

@@ -151,7 +151,7 @@ static void create_matrix()
 				perror("open");
 				exit(1);
 			}
-			if (write(fd, blockptr, blocksize) != (ssize_t) blocksize) {
+			if (write(fd, blockptr, blocksize) != (starpu_ssize_t) blocksize) {
 				fprintf(stderr,"short write");
 				exit(1);
 			}

+ 4 - 4
mpi/src/starpu_mpi.c

@@ -43,7 +43,7 @@ static struct _starpu_mpi_req *_starpu_mpi_irecv_common(starpu_data_handle_t dat
 							int source, int mpi_tag, MPI_Comm comm,
 							unsigned detached, void (*callback)(void *), void *arg,
 							int sequential_consistency, int is_internal_req,
-							ssize_t count);
+							starpu_ssize_t count);
 static void _starpu_mpi_handle_detached_request(struct _starpu_mpi_req *req);
 
 /* The list of ready requests */
@@ -128,7 +128,7 @@ static void _starpu_mpi_request_init(struct _starpu_mpi_req **req)
 							       enum starpu_data_access_mode mode,
 							       int sequential_consistency,
 							       int is_internal_req,
-							       ssize_t count)
+							       starpu_ssize_t count)
 {
 	struct _starpu_mpi_req *req;
 
@@ -205,7 +205,7 @@ static void _starpu_mpi_request_init(struct _starpu_mpi_req **req)
 		req->ptr = starpu_data_get_local_ptr(req->data_handle);
 
 		MPI_Type_size(req->datatype, &size);
-		req->envelope->size = (ssize_t)req->count * size;
+		req->envelope->size = (starpu_ssize_t)req->count * size;
 		_STARPU_MPI_DEBUG(1, "Post MPI isend count (%ld) datatype_size %ld request to %d with tag %d\n",req->count,starpu_data_get_size(req->data_handle),req->srcdst, _starpu_mpi_tag);
 		MPI_Isend(req->envelope, sizeof(struct _starpu_mpi_envelope), MPI_BYTE, req->srcdst, _starpu_mpi_tag, req->comm, &req->size_req);
 	}
@@ -322,7 +322,7 @@ static void _starpu_mpi_irecv_data_func(struct _starpu_mpi_req *req)
 	_STARPU_MPI_LOG_OUT();
 }
 
-static struct _starpu_mpi_req *_starpu_mpi_irecv_common(starpu_data_handle_t data_handle, int source, int mpi_tag, MPI_Comm comm, unsigned detached, void (*callback)(void *), void *arg, int sequential_consistency, int is_internal_req, ssize_t count)
+static struct _starpu_mpi_req *_starpu_mpi_irecv_common(starpu_data_handle_t data_handle, int source, int mpi_tag, MPI_Comm comm, unsigned detached, void (*callback)(void *), void *arg, int sequential_consistency, int is_internal_req, starpu_ssize_t count)
 {
 	return _starpu_mpi_isend_irecv_common(data_handle, source, mpi_tag, comm, detached, callback, arg, RECV_REQ, _starpu_mpi_irecv_data_func, STARPU_W, sequential_consistency, is_internal_req, count);
 }

+ 3 - 3
mpi/src/starpu_mpi_private.h

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
- * Copyright (C) 2010, 2012-2013  Université de Bordeaux
+ * Copyright (C) 2010, 2012-2014  Université de Bordeaux
  * Copyright (C) 2010, 2011, 2012, 2013, 2014  Centre National de la Recherche Scientifique
  *
  * StarPU is free software; you can redistribute it and/or modify
@@ -87,7 +87,7 @@ enum _starpu_mpi_request_type
 
 struct _starpu_mpi_envelope
 {
-	ssize_t size;
+	starpu_ssize_t size;
 	int mpi_tag;
 };
 
@@ -100,7 +100,7 @@ LIST_TYPE(_starpu_mpi_req,
 	/* description of the data to be sent/received */
 	MPI_Datatype datatype;
 	void *ptr;
-	ssize_t count;
+	starpu_ssize_t count;
 	int user_datatype;
 
 	/* who are we talking to ? */

+ 1 - 1
mpi/tests/user_defined_datatype_value.h

@@ -90,7 +90,7 @@ static void *value_handle_to_pointer(starpu_data_handle_t handle, unsigned node)
 	return (void*) value_interface->value;
 }
 
-static int value_pack_data(starpu_data_handle_t handle, unsigned node, void **ptr, ssize_t *count)
+static int value_pack_data(starpu_data_handle_t handle, unsigned node, void **ptr, starpu_ssize_t *count)
 {
 	STARPU_ASSERT(starpu_data_test_if_allocated_on_node(handle, node));
 

+ 2 - 2
src/core/disk.c

@@ -53,7 +53,7 @@ static int size_register_list = 2;
 
 
 int
-starpu_disk_register(struct starpu_disk_ops * func, void *parameter, ssize_t size)
+starpu_disk_register(struct starpu_disk_ops * func, void *parameter, starpu_ssize_t size)
 {
 
 	STARPU_ASSERT_MSG(size < 0 || size >= SIZE_DISK_MIN,"Minimum disk size is %u Bytes ! (Here %u) \n", (int) SIZE_DISK_MIN, (int) size);
@@ -366,7 +366,7 @@ _starpu_swap_init(void)
 {
 	char *backend;
 	char *path;
-	ssize_t size;
+	starpu_ssize_t size;
 	struct starpu_disk_ops *ops;
 	int dd;
 

+ 1 - 1
src/core/disk_ops/disk_leveldb.cpp

@@ -234,7 +234,7 @@ starpu_leveldb_full_write (void * base, void * obj, void * ptr, size_t size)
 
 /* create a new copy of parameter == base */
 static void * 
-starpu_leveldb_plug (void *parameter, ssize_t size STARPU_ATTRIBUTE_UNUSED)
+starpu_leveldb_plug (void *parameter, starpu_ssize_t size STARPU_ATTRIBUTE_UNUSED)
 {
 	struct starpu_leveldb_base * tmp = (struct starpu_leveldb_base *) malloc(sizeof(struct starpu_leveldb_base));
 	STARPU_ASSERT(tmp != NULL);

+ 2 - 2
src/core/disk_ops/disk_stdio.c

@@ -191,7 +191,7 @@ static int starpu_stdio_read(void *base STARPU_ATTRIBUTE_UNUSED, void *obj, void
 	int res = fseek(tmp->file, offset, SEEK_SET);
 	STARPU_ASSERT_MSG(res == 0, "Stdio read failed");
 
-	ssize_t nb = fread (buf, 1, size, tmp->file);
+	starpu_ssize_t nb = fread (buf, 1, size, tmp->file);
 	STARPU_ASSERT_MSG(nb >= 0, "Stdio read failed");
 
 	STARPU_PTHREAD_MUTEX_UNLOCK(&tmp->mutex);
@@ -256,7 +256,7 @@ static int starpu_stdio_full_write(void * base STARPU_ATTRIBUTE_UNUSED, void * o
 }
 
 /* create a new copy of parameter == base */
-static void *starpu_stdio_plug(void *parameter, ssize_t size STARPU_ATTRIBUTE_UNUSED)
+static void *starpu_stdio_plug(void *parameter, starpu_ssize_t size STARPU_ATTRIBUTE_UNUSED)
 {
 	char * tmp = malloc(sizeof(char)*(strlen(parameter)+1));
 	STARPU_ASSERT(tmp != NULL);

+ 1 - 1
src/core/disk_ops/disk_unistd_o_direct.c

@@ -80,7 +80,7 @@ starpu_unistd_o_direct_write (void *base STARPU_ATTRIBUTE_UNUSED, void *obj, con
 
 /* create a new copy of parameter == base */
 static void * 
-starpu_unistd_o_direct_plug (void *parameter, ssize_t size)
+starpu_unistd_o_direct_plug (void *parameter, starpu_ssize_t size)
 {
 	starpu_malloc_set_align(getpagesize());
 

+ 2 - 2
src/core/disk_ops/unistd/disk_unistd_global.c

@@ -175,7 +175,7 @@ starpu_unistd_global_close (void *base STARPU_ATTRIBUTE_UNUSED, void *obj, size_
 starpu_unistd_global_read (void *base STARPU_ATTRIBUTE_UNUSED, void *obj, void *buf, off_t offset, size_t size)
 {
 	struct starpu_unistd_global_obj * tmp = (struct starpu_unistd_global_obj *) obj;
-	ssize_t nb;
+	starpu_ssize_t nb;
 
 #ifdef HAVE_PREAD
 	nb = pread(tmp->descriptor, buf, size, offset);
@@ -314,7 +314,7 @@ starpu_unistd_global_full_write (void * base STARPU_ATTRIBUTE_UNUSED, void * obj
 
 /* create a new copy of parameter == base */
  void * 
-starpu_unistd_global_plug (void *parameter, ssize_t size STARPU_ATTRIBUTE_UNUSED)
+starpu_unistd_global_plug (void *parameter, starpu_ssize_t size STARPU_ATTRIBUTE_UNUSED)
 {
 	char * tmp = malloc(sizeof(char)*(strlen(parameter)+1));
 	STARPU_ASSERT(tmp != NULL);

+ 1 - 1
src/core/disk_ops/unistd/disk_unistd_global.h

@@ -37,7 +37,7 @@ void * starpu_unistd_global_open (struct starpu_unistd_global_obj * obj, void *b
 void starpu_unistd_global_close (void *base, void *obj, size_t size);
 int starpu_unistd_global_read (void *base, void *obj, void *buf, off_t offset, size_t size);
 int starpu_unistd_global_write (void *base, void *obj, const void *buf, off_t offset, size_t size);
-void * starpu_unistd_global_plug (void *parameter, ssize_t size);
+void * starpu_unistd_global_plug (void *parameter, starpu_ssize_t size);
 void starpu_unistd_global_unplug (void *base);
 int get_unistd_global_bandwidth_between_disk_and_main_ram(unsigned node);
 void* starpu_unistd_global_async_read (void *base, void *obj, void *buf, off_t offset, size_t size);

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

@@ -44,7 +44,7 @@ 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);
-static ssize_t describe(void *data_interface, char *buf, size_t size);
+static starpu_ssize_t describe(void *data_interface, char *buf, size_t size);
 
 
 struct starpu_data_interface_ops starpu_interface_bcsr_ops =
@@ -327,7 +327,7 @@ static int copy_any_to_any(void *src_interface, unsigned src_node, void *dst_int
 	return ret;
 }
 
-static ssize_t describe(void *data_interface, char *buf, size_t size)
+static starpu_ssize_t describe(void *data_interface, char *buf, size_t size)
 {
 	struct starpu_bcsr_interface *bcsr = (struct starpu_bcsr_interface *) data_interface;
 	return snprintf(buf, size, "b%ux%ux%ux%ux%u",

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

@@ -75,9 +75,9 @@ 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);
 static void display_block_interface(starpu_data_handle_t handle, FILE *f);
-static int pack_block_handle(starpu_data_handle_t handle, unsigned node, void **ptr, ssize_t *count);
+static int pack_block_handle(starpu_data_handle_t handle, unsigned node, void **ptr, starpu_ssize_t *count);
 static int unpack_block_handle(starpu_data_handle_t handle, unsigned node, void *ptr, size_t count);
-static ssize_t describe(void *data_interface, char *buf, size_t size);
+static starpu_ssize_t describe(void *data_interface, char *buf, size_t size);
 
 struct starpu_data_interface_ops starpu_interface_block_ops =
 {
@@ -213,7 +213,7 @@ static void display_block_interface(starpu_data_handle_t handle, FILE *f)
 	fprintf(f, "%u\t%u\t%u\t", block_interface->nx, block_interface->ny, block_interface->nz);
 }
 
-static int pack_block_handle(starpu_data_handle_t handle, unsigned node, void **ptr, ssize_t *count)
+static int pack_block_handle(starpu_data_handle_t handle, unsigned node, void **ptr, starpu_ssize_t *count)
 {
 	STARPU_ASSERT(starpu_data_test_if_allocated_on_node(handle, node));
 
@@ -733,7 +733,7 @@ static int copy_any_to_any(void *src_interface, unsigned src_node, void *dst_int
 	return ret;
 }
 
-static ssize_t describe(void *data_interface, char *buf, size_t size)
+static starpu_ssize_t describe(void *data_interface, char *buf, size_t size)
 {
 	struct starpu_block_interface *block = (struct starpu_block_interface *) data_interface;
 	return snprintf(buf, size, "B%ux%ux%ux%u",

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

@@ -191,7 +191,7 @@ display_coo_interface(starpu_data_handle_t handle, FILE *f)
 	fprintf(f, "%u\t%u", coo_interface->nx, coo_interface->ny);
 }
 
-static ssize_t describe(void *data_interface, char *buf, size_t size)
+static starpu_ssize_t describe(void *data_interface, char *buf, size_t size)
 {
 	struct starpu_coo_interface *coo = (struct starpu_coo_interface *) data_interface;
 	return snprintf(buf, size, "M%ux%ux%ux%u",

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

@@ -43,7 +43,7 @@ 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);
-static ssize_t describe(void *data_interface, char *buf, size_t size);
+static starpu_ssize_t describe(void *data_interface, char *buf, size_t size);
 
 struct starpu_data_interface_ops starpu_interface_csr_ops =
 {
@@ -293,7 +293,7 @@ static int copy_any_to_any(void *src_interface, unsigned src_node, void *dst_int
 	return ret;
 }
 
-static ssize_t describe(void *data_interface, char *buf, size_t size)
+static starpu_ssize_t describe(void *data_interface, char *buf, size_t size)
 {
 	struct starpu_csr_interface *csr = (struct starpu_csr_interface *) data_interface;
 	return snprintf(buf, size, "C%ux%ux%u",

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

@@ -79,9 +79,9 @@ 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);
 static void display_matrix_interface(starpu_data_handle_t handle, FILE *f);
-static int pack_matrix_handle(starpu_data_handle_t handle, unsigned node, void **ptr, ssize_t *count);
+static int pack_matrix_handle(starpu_data_handle_t handle, unsigned node, void **ptr, starpu_ssize_t *count);
 static int unpack_matrix_handle(starpu_data_handle_t handle, unsigned node, void *ptr, size_t count);
-static ssize_t describe(void *data_interface, char *buf, size_t size);
+static starpu_ssize_t describe(void *data_interface, char *buf, size_t size);
 
 struct starpu_data_interface_ops starpu_interface_matrix_ops =
 {
@@ -204,7 +204,7 @@ static void display_matrix_interface(starpu_data_handle_t handle, FILE *f)
 	fprintf(f, "%u\t%u\t", matrix_interface->nx, matrix_interface->ny);
 }
 
-static int pack_matrix_handle(starpu_data_handle_t handle, unsigned node, void **ptr, ssize_t *count)
+static int pack_matrix_handle(starpu_data_handle_t handle, unsigned node, void **ptr, starpu_ssize_t *count)
 {
 	STARPU_ASSERT(starpu_data_test_if_allocated_on_node(handle, node));
 
@@ -567,7 +567,7 @@ static int copy_any_to_any(void *src_interface, unsigned src_node, void *dst_int
 	return ret;
 }
 
-static ssize_t describe(void *data_interface, char *buf, size_t size)
+static starpu_ssize_t describe(void *data_interface, char *buf, size_t size)
 {
 	struct starpu_matrix_interface *matrix = (struct starpu_matrix_interface *) data_interface;
 	return snprintf(buf, size, "M%ux%ux%u",

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

@@ -42,9 +42,9 @@ 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);
 static void display_variable_interface(starpu_data_handle_t handle, FILE *f);
-static int pack_variable_handle(starpu_data_handle_t handle, unsigned node, void **ptr, ssize_t *count);
+static int pack_variable_handle(starpu_data_handle_t handle, unsigned node, void **ptr, starpu_ssize_t *count);
 static int unpack_variable_handle(starpu_data_handle_t handle, unsigned node, void *ptr, size_t count);
-static ssize_t describe(void *data_interface, char *buf, size_t size);
+static starpu_ssize_t describe(void *data_interface, char *buf, size_t size);
 
 struct starpu_data_interface_ops starpu_interface_variable_ops =
 {
@@ -152,7 +152,7 @@ static void display_variable_interface(starpu_data_handle_t handle, FILE *f)
 	fprintf(f, "%ld\t", (long)variable_interface->elemsize);
 }
 
-static int pack_variable_handle(starpu_data_handle_t handle, unsigned node, void **ptr, ssize_t *count)
+static int pack_variable_handle(starpu_data_handle_t handle, unsigned node, void **ptr, starpu_ssize_t *count)
 {
 	STARPU_ASSERT(starpu_data_test_if_allocated_on_node(handle, node));
 
@@ -247,7 +247,7 @@ static int copy_any_to_any(void *src_interface, unsigned src_node, void *dst_int
 
 	return ret;
 }
-static ssize_t describe(void *data_interface, char *buf, size_t size)
+static starpu_ssize_t describe(void *data_interface, char *buf, size_t size)
 {
 	struct starpu_variable_interface *variable = (struct starpu_variable_interface *) data_interface;
 	return snprintf(buf, size, "v%u",

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

@@ -42,9 +42,9 @@ 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);
 static void display_vector_interface(starpu_data_handle_t handle, FILE *f);
-static int pack_vector_handle(starpu_data_handle_t handle, unsigned node, void **ptr, ssize_t *count);
+static int pack_vector_handle(starpu_data_handle_t handle, unsigned node, void **ptr, starpu_ssize_t *count);
 static int unpack_vector_handle(starpu_data_handle_t handle, unsigned node, void *ptr, size_t count);
-static ssize_t describe(void *data_interface, char *buf, size_t size);
+static starpu_ssize_t describe(void *data_interface, char *buf, size_t size);
 
 struct starpu_data_interface_ops starpu_interface_vector_ops =
 {
@@ -160,7 +160,7 @@ static void display_vector_interface(starpu_data_handle_t handle, FILE *f)
 	fprintf(f, "%u\t", vector_interface->nx);
 }
 
-static int pack_vector_handle(starpu_data_handle_t handle, unsigned node, void **ptr, ssize_t *count)
+static int pack_vector_handle(starpu_data_handle_t handle, unsigned node, void **ptr, starpu_ssize_t *count)
 {
 	STARPU_ASSERT(starpu_data_test_if_allocated_on_node(handle, node));
 
@@ -287,7 +287,7 @@ static int copy_any_to_any(void *src_interface, unsigned src_node,
 	return ret;
 }
 
-static ssize_t describe(void *data_interface, char *buf, size_t size)
+static starpu_ssize_t describe(void *data_interface, char *buf, size_t size)
 {
 	struct starpu_vector_interface *vector = (struct starpu_vector_interface *) data_interface;
 	return snprintf(buf, size, "V%ux%u",

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

@@ -39,9 +39,9 @@ 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);
 static void display_void_interface(starpu_data_handle_t handle, FILE *f);
-static int pack_void_handle(starpu_data_handle_t handle, unsigned node, void **ptr, ssize_t *count);
+static int pack_void_handle(starpu_data_handle_t handle, unsigned node, void **ptr, starpu_ssize_t *count);
 static int unpack_void_handle(starpu_data_handle_t handle, unsigned node, void *ptr, size_t count);
-static ssize_t describe(void *data_interface, char *buf, size_t size);
+static starpu_ssize_t describe(void *data_interface, char *buf, size_t size);
 
 struct starpu_data_interface_ops starpu_interface_void_ops =
 {
@@ -95,7 +95,7 @@ static void display_void_interface(starpu_data_handle_t handle STARPU_ATTRIBUTE_
 static int pack_void_handle(starpu_data_handle_t handle STARPU_ATTRIBUTE_UNUSED,
 			    unsigned node STARPU_ATTRIBUTE_UNUSED,
 			    void **ptr,
-			    ssize_t *count)
+			    starpu_ssize_t *count)
 {
 	*count = 0;
 	*ptr = NULL;
@@ -140,7 +140,7 @@ static int dummy_copy(void *src_interface STARPU_ATTRIBUTE_UNUSED,
 	return 0;
 }
 
-static ssize_t describe(void *data_interface STARPU_ATTRIBUTE_UNUSED, char *buf, size_t size)
+static starpu_ssize_t describe(void *data_interface STARPU_ATTRIBUTE_UNUSED, char *buf, size_t size)
 {
 	return snprintf(buf, size, "0");
 }

+ 1 - 1
src/datawizard/memalloc.c

@@ -38,7 +38,7 @@ struct mc_cache_entry
 };
 static struct mc_cache_entry *mc_cache[STARPU_MAXNODES];
 static int mc_cache_nb[STARPU_MAXNODES];
-static ssize_t mc_cache_size[STARPU_MAXNODES];
+static starpu_ssize_t mc_cache_size[STARPU_MAXNODES];
 
 
 /* When reclaiming memory to allocate, we reclaim MAX(what_is_to_reclaim_on_device, data_size_coefficient*data_size) */

+ 2 - 2
tests/datawizard/allocate.c

@@ -38,7 +38,7 @@ int test_prefetch(unsigned memnodes)
 	float *buffers[4];
 	starpu_data_handle_t handles[4];
 	unsigned i;
-	ssize_t available_size;
+	starpu_ssize_t available_size;
 
 	buffers[0] = malloc(SIZE_ALLOC*1024*512);
 	STARPU_ASSERT(buffers[0]);
@@ -162,7 +162,7 @@ int main(int argc, char **argv)
 {
 	int ret;
 	unsigned memnodes, i;
-	ssize_t available_size;
+	starpu_ssize_t available_size;
 
 	setenv("STARPU_LIMIT_CUDA_MEM", STR_LIMIT, 1);
 	setenv("STARPU_LIMIT_OPENCL_MEM", STR_LIMIT, 1);