Browse Source

Rename function starpu_allocate_buffer_on_node to starpu_malloc_on_node
Rename function starpu_free_buffer_on_node to starpu_free_on_node

Nathalie Furmento 12 years ago
parent
commit
6021863a0a

+ 2 - 0
ChangeLog

@@ -144,6 +144,8 @@ Changes:
     applications using filters.
     applications using filters.
   * Rename function starpu_helper_cublas_init to starpu_cublas_init
   * Rename function starpu_helper_cublas_init to starpu_cublas_init
   * Rename function starpu_helper_cublas_shutdown to starpu_cublas_shutdown
   * Rename function starpu_helper_cublas_shutdown to starpu_cublas_shutdown
+  * Rename function starpu_allocate_buffer_on_node to starpu_malloc_on_node
+  * Rename function starpu_free_buffer_on_node to starpu_free_on_node
 
 
 Small changes:
 Small changes:
   * STARPU_NCPU should now be used instead of STARPU_NCPUS. STARPU_NCPUS is
   * STARPU_NCPU should now be used instead of STARPU_NCPUS. STARPU_NCPUS is

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

@@ -1221,12 +1221,12 @@ Return the size of the elements registered into the matrix designated by
 Applications can provide their own interface. An example is provided in
 Applications can provide their own interface. An example is provided in
 @code{examples/interface}. A few helpers are provided.
 @code{examples/interface}. A few helpers are provided.
 
 
-@deftypefun uintptr_t starpu_allocate_buffer_on_node (unsigned @var{dst_node}, size_t @var{size})
+@deftypefun uintptr_t starpu_malloc_on_node (unsigned @var{dst_node}, size_t @var{size})
 Allocate @var{size} bytes on node @var{dst_node}. This returns 0 if allocation
 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.
 failed, the allocation method should then return -ENOMEM as allocated size.
 @end deftypefun
 @end deftypefun
 
 
-@deftypefun void starpu_free_buffer_on_node (unsigned @var{dst_node}, uintptr_t @var{addr}, size_t @var{size})
+@deftypefun void starpu_free_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}.
 Free @var{addr} of @var{size} bytes on node @var{dst_node}.
 @end deftypefun
 @end deftypefun
 
 

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

@@ -150,16 +150,16 @@ static ssize_t allocate_custom_buffer_on_node(void *data_interface, unsigned nod
 	custom_interface = (struct custom_data_interface *) data_interface;
 	custom_interface = (struct custom_data_interface *) data_interface;
 
 
 	size = custom_interface->nx * custom_interface->ops->cpu_elemsize;
 	size = custom_interface->nx * custom_interface->ops->cpu_elemsize;
-	custom_interface->cpu_ptr = (void*) starpu_allocate_buffer_on_node(node, size);
+	custom_interface->cpu_ptr = (void*) starpu_malloc_on_node(node, size);
 	if (!custom_interface->cpu_ptr)
 	if (!custom_interface->cpu_ptr)
 		goto fail_cpu;
 		goto fail_cpu;
 #ifdef STARPU_USE_CUDA
 #ifdef STARPU_USE_CUDA
-	custom_interface->cuda_ptr = (void*) starpu_allocate_buffer_on_node(node, size);
+	custom_interface->cuda_ptr = (void*) starpu_malloc_on_node(node, size);
 	if (!custom_interface->cuda_ptr)
 	if (!custom_interface->cuda_ptr)
 		goto fail_cuda;
 		goto fail_cuda;
 #endif
 #endif
 #ifdef STARPU_USE_OPENCL
 #ifdef STARPU_USE_OPENCL
-	custom_interface->opencl_ptr = (void*) starpu_allocate_buffer_on_node(node, size);
+	custom_interface->opencl_ptr = (void*) starpu_malloc_on_node(node, size);
 	if (!custom_interface->opencl_ptr)
 	if (!custom_interface->opencl_ptr)
 		goto fail_opencl;
 		goto fail_opencl;
 #endif
 #endif
@@ -175,13 +175,13 @@ static ssize_t allocate_custom_buffer_on_node(void *data_interface, unsigned nod
 #ifdef STARPU_USE_OPENCL
 #ifdef STARPU_USE_OPENCL
 fail_opencl:
 fail_opencl:
 #ifdef STARPU_USE_CUDA
 #ifdef STARPU_USE_CUDA
-	starpu_free_buffer_on_node(node, (uintptr_t) custom_interface->cuda_ptr, size);
+	starpu_free_on_node(node, (uintptr_t) custom_interface->cuda_ptr, size);
 #endif
 #endif
 #endif
 #endif
 #ifdef STARPU_USE_CUDA
 #ifdef STARPU_USE_CUDA
 fail_cuda:
 fail_cuda:
 #endif
 #endif
-	starpu_free_buffer_on_node(node, (uintptr_t) custom_interface->cpu_ptr, size);
+	starpu_free_on_node(node, (uintptr_t) custom_interface->cpu_ptr, size);
 fail_cpu:
 fail_cpu:
 	return -ENOMEM;
 	return -ENOMEM;
 }
 }
@@ -191,12 +191,12 @@ static void free_custom_buffer_on_node(void *data_interface, unsigned node)
 	struct custom_data_interface *custom_interface = (struct custom_data_interface *) data_interface;
 	struct custom_data_interface *custom_interface = (struct custom_data_interface *) data_interface;
 	size_t size = custom_interface->nx * custom_interface->ops->cpu_elemsize;
 	size_t size = custom_interface->nx * custom_interface->ops->cpu_elemsize;
 
 
-	starpu_free_buffer_on_node(node, (uintptr_t) custom_interface->cpu_ptr, size);
+	starpu_free_on_node(node, (uintptr_t) custom_interface->cpu_ptr, size);
 #ifdef STARPU_USE_CUDA
 #ifdef STARPU_USE_CUDA
-	starpu_free_buffer_on_node(node, (uintptr_t) custom_interface->cuda_ptr, size);
+	starpu_free_on_node(node, (uintptr_t) custom_interface->cuda_ptr, size);
 #endif
 #endif
 #ifdef STARPU_USE_OPENCL
 #ifdef STARPU_USE_OPENCL
-	starpu_free_buffer_on_node(node, (uintptr_t) custom_interface->opencl_ptr, size);
+	starpu_free_on_node(node, (uintptr_t) custom_interface->opencl_ptr, size);
 #endif
 #endif
 }
 }
 
 

+ 5 - 5
examples/interface/complex_interface.c

@@ -66,10 +66,10 @@ static starpu_ssize_t complex_allocate_data_on_node(void *data_interface, unsign
 	double *addr_imaginary = 0;
 	double *addr_imaginary = 0;
 	ssize_t requested_memory = complex_interface->nx * sizeof(complex_interface->real[0]);
 	ssize_t requested_memory = complex_interface->nx * sizeof(complex_interface->real[0]);
 
 
-	addr_real = (double*) starpu_allocate_buffer_on_node(node, requested_memory);
+	addr_real = (double*) starpu_malloc_on_node(node, requested_memory);
 	if (!addr_real)
 	if (!addr_real)
 		goto fail_real;
 		goto fail_real;
-	addr_imaginary = (double*) starpu_allocate_buffer_on_node(node, requested_memory);
+	addr_imaginary = (double*) starpu_malloc_on_node(node, requested_memory);
 	if (!addr_imaginary)
 	if (!addr_imaginary)
 		goto fail_imaginary;
 		goto fail_imaginary;
 
 
@@ -80,7 +80,7 @@ static starpu_ssize_t complex_allocate_data_on_node(void *data_interface, unsign
 	return 2*requested_memory;
 	return 2*requested_memory;
 
 
 fail_imaginary:
 fail_imaginary:
-	starpu_free_buffer_on_node(node, (uintptr_t) addr_real, requested_memory);
+	starpu_free_on_node(node, (uintptr_t) addr_real, requested_memory);
 fail_real:
 fail_real:
 	return -ENOMEM;
 	return -ENOMEM;
 }
 }
@@ -90,8 +90,8 @@ static void complex_free_data_on_node(void *data_interface, unsigned node)
 	struct starpu_complex_interface *complex_interface = (struct starpu_complex_interface *) data_interface;
 	struct starpu_complex_interface *complex_interface = (struct starpu_complex_interface *) data_interface;
 	ssize_t requested_memory = complex_interface->nx * sizeof(complex_interface->real[0]);
 	ssize_t requested_memory = complex_interface->nx * sizeof(complex_interface->real[0]);
 
 
-	starpu_free_buffer_on_node(node, (uintptr_t) complex_interface->real, requested_memory);
+	starpu_free_on_node(node, (uintptr_t) complex_interface->real, requested_memory);
-	starpu_free_buffer_on_node(node, (uintptr_t) complex_interface->imaginary, requested_memory);
+	starpu_free_on_node(node, (uintptr_t) complex_interface->imaginary, requested_memory);
 }
 }
 
 
 static size_t complex_get_size(starpu_data_handle_t handle)
 static size_t complex_get_size(starpu_data_handle_t handle)

+ 2 - 2
include/starpu_stdlib.h

@@ -30,9 +30,9 @@ int starpu_malloc(void **A, size_t dim);
 int starpu_free(void *A);
 int starpu_free(void *A);
 
 
 /* Allocate SIZE bytes on node NODE */
 /* Allocate SIZE bytes on node NODE */
-uintptr_t starpu_allocate_buffer_on_node(unsigned dst_node, size_t size);
+uintptr_t starpu_malloc_on_node(unsigned dst_node, size_t size);
 /* Free ADDR on node NODE */
 /* Free ADDR on node NODE */
-void starpu_free_buffer_on_node(unsigned dst_node, uintptr_t addr, size_t size);
+void starpu_free_on_node(unsigned dst_node, uintptr_t addr, size_t size);
 
 
 #ifdef __cplusplus
 #ifdef __cplusplus
 }
 }

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

@@ -251,13 +251,13 @@ static ssize_t allocate_bcsr_buffer_on_node(void *data_interface_, unsigned dst_
 	uint32_t r = bcsr_interface->r;
 	uint32_t r = bcsr_interface->r;
 	uint32_t c = bcsr_interface->c;
 	uint32_t c = bcsr_interface->c;
 
 
-	addr_nzval = starpu_allocate_buffer_on_node(dst_node, nnz*r*c*elemsize);
+	addr_nzval = starpu_malloc_on_node(dst_node, nnz*r*c*elemsize);
 	if (!addr_nzval)
 	if (!addr_nzval)
 		goto fail_nzval;
 		goto fail_nzval;
-	addr_colind = starpu_allocate_buffer_on_node(dst_node, nnz*sizeof(uint32_t));
+	addr_colind = starpu_malloc_on_node(dst_node, nnz*sizeof(uint32_t));
 	if (!addr_colind)
 	if (!addr_colind)
 		goto fail_colind;
 		goto fail_colind;
-	addr_rowptr = starpu_allocate_buffer_on_node(dst_node, (nrow+1)*sizeof(uint32_t));
+	addr_rowptr = starpu_malloc_on_node(dst_node, (nrow+1)*sizeof(uint32_t));
 	if (!addr_rowptr)
 	if (!addr_rowptr)
 		goto fail_rowptr;
 		goto fail_rowptr;
 
 
@@ -273,9 +273,9 @@ static ssize_t allocate_bcsr_buffer_on_node(void *data_interface_, unsigned dst_
 	return allocated_memory;
 	return allocated_memory;
 
 
 fail_rowptr:
 fail_rowptr:
-	starpu_free_buffer_on_node(dst_node, addr_colind, nnz*sizeof(uint32_t));
+	starpu_free_on_node(dst_node, addr_colind, nnz*sizeof(uint32_t));
 fail_colind:
 fail_colind:
-	starpu_free_buffer_on_node(dst_node, addr_nzval, nnz*r*c*elemsize);
+	starpu_free_on_node(dst_node, addr_nzval, nnz*r*c*elemsize);
 fail_nzval:
 fail_nzval:
 	/* allocation failed */
 	/* allocation failed */
 	return -ENOMEM;
 	return -ENOMEM;
@@ -290,9 +290,9 @@ static void free_bcsr_buffer_on_node(void *data_interface, unsigned node)
 	uint32_t r = bcsr_interface->r;
 	uint32_t r = bcsr_interface->r;
 	uint32_t c = bcsr_interface->c;
 	uint32_t c = bcsr_interface->c;
 
 
-	starpu_free_buffer_on_node(node, bcsr_interface->nzval, nnz*r*c*elemsize);
+	starpu_free_on_node(node, bcsr_interface->nzval, nnz*r*c*elemsize);
-	starpu_free_buffer_on_node(node, (uintptr_t) bcsr_interface->colind, nnz*sizeof(uint32_t));
+	starpu_free_on_node(node, (uintptr_t) bcsr_interface->colind, nnz*sizeof(uint32_t));
-	starpu_free_buffer_on_node(node, (uintptr_t) bcsr_interface->rowptr, (nrow+1)*sizeof(uint32_t));
+	starpu_free_on_node(node, (uintptr_t) bcsr_interface->rowptr, (nrow+1)*sizeof(uint32_t));
 }
 }
 
 
 static int copy_any_to_any(void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node, void *async_data)
 static int copy_any_to_any(void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node, void *async_data)

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

@@ -287,7 +287,7 @@ static ssize_t allocate_block_buffer_on_node(void *data_interface_, unsigned dst
 
 
 	ssize_t allocated_memory;
 	ssize_t allocated_memory;
 
 
-	handle = starpu_allocate_buffer_on_node(dst_node, nx*ny*nz*elemsize);
+	handle = starpu_malloc_on_node(dst_node, nx*ny*nz*elemsize);
 
 
 	if (!handle)
 	if (!handle)
 		return -ENOMEM;
 		return -ENOMEM;
@@ -315,7 +315,7 @@ static void free_block_buffer_on_node(void *data_interface, unsigned node)
 	uint32_t nz = block_interface->nz;
 	uint32_t nz = block_interface->nz;
 	size_t elemsize = block_interface->elemsize;
 	size_t elemsize = block_interface->elemsize;
 
 
-	starpu_free_buffer_on_node(node, block_interface->ptr, nx*ny*nz*elemsize);
+	starpu_free_on_node(node, block_interface->ptr, nx*ny*nz*elemsize);
 }
 }
 
 
 #ifdef STARPU_USE_CUDA
 #ifdef STARPU_USE_CUDA

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

@@ -109,13 +109,13 @@ allocate_coo_buffer_on_node(void *data_interface, unsigned dst_node)
 	uint32_t n_values = coo_interface->n_values;
 	uint32_t n_values = coo_interface->n_values;
 	size_t elemsize = coo_interface->elemsize;
 	size_t elemsize = coo_interface->elemsize;
 
 
-	addr_columns = (void*) starpu_allocate_buffer_on_node(dst_node, n_values * sizeof(coo_interface->columns[0]));
+	addr_columns = (void*) starpu_malloc_on_node(dst_node, n_values * sizeof(coo_interface->columns[0]));
 	if (STARPU_UNLIKELY(addr_columns == NULL))
 	if (STARPU_UNLIKELY(addr_columns == NULL))
 		goto fail_columns;
 		goto fail_columns;
-	addr_rows = (void*) starpu_allocate_buffer_on_node(dst_node, n_values * sizeof(coo_interface->rows[0]));
+	addr_rows = (void*) starpu_malloc_on_node(dst_node, n_values * sizeof(coo_interface->rows[0]));
 	if (STARPU_UNLIKELY(addr_rows == NULL))
 	if (STARPU_UNLIKELY(addr_rows == NULL))
 		goto fail_rows;
 		goto fail_rows;
-	addr_values = starpu_allocate_buffer_on_node(dst_node, n_values * elemsize);
+	addr_values = starpu_malloc_on_node(dst_node, n_values * elemsize);
 	if (STARPU_UNLIKELY(addr_values == (uintptr_t) NULL))
 	if (STARPU_UNLIKELY(addr_values == (uintptr_t) NULL))
 		goto fail_values;
 		goto fail_values;
 
 
@@ -126,9 +126,9 @@ allocate_coo_buffer_on_node(void *data_interface, unsigned dst_node)
 	return n_values * (sizeof(coo_interface->columns[0]) + sizeof(coo_interface->rows[0]) + elemsize);
 	return n_values * (sizeof(coo_interface->columns[0]) + sizeof(coo_interface->rows[0]) + elemsize);
 
 
 fail_values:
 fail_values:
-	starpu_free_buffer_on_node(dst_node, (uintptr_t) addr_rows, n_values * sizeof(coo_interface->rows[0]));
+	starpu_free_on_node(dst_node, (uintptr_t) addr_rows, n_values * sizeof(coo_interface->rows[0]));
 fail_rows:
 fail_rows:
-	starpu_free_buffer_on_node(dst_node, (uintptr_t) addr_columns, n_values * sizeof(coo_interface->columns[0]));
+	starpu_free_on_node(dst_node, (uintptr_t) addr_columns, n_values * sizeof(coo_interface->columns[0]));
 fail_columns:
 fail_columns:
 	return -ENOMEM;
 	return -ENOMEM;
 }
 }
@@ -140,9 +140,9 @@ free_coo_buffer_on_node(void *data_interface, unsigned node)
 	uint32_t n_values = coo_interface->n_values;
 	uint32_t n_values = coo_interface->n_values;
 	size_t elemsize = coo_interface->elemsize;
 	size_t elemsize = coo_interface->elemsize;
 
 
-	starpu_free_buffer_on_node(node, (uintptr_t) coo_interface->columns, n_values * sizeof(coo_interface->columns[0]));
+	starpu_free_on_node(node, (uintptr_t) coo_interface->columns, n_values * sizeof(coo_interface->columns[0]));
-	starpu_free_buffer_on_node(node, (uintptr_t) coo_interface->rows, n_values * sizeof(coo_interface->rows[0]));
+	starpu_free_on_node(node, (uintptr_t) coo_interface->rows, n_values * sizeof(coo_interface->rows[0]));
-	starpu_free_buffer_on_node(node, coo_interface->values, n_values * elemsize);
+	starpu_free_on_node(node, coo_interface->values, n_values * elemsize);
 }
 }
 
 
 static size_t
 static size_t

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

@@ -220,13 +220,13 @@ static ssize_t allocate_csr_buffer_on_node(void *data_interface_, unsigned dst_n
 	uint32_t nrow = csr_interface->nrow;
 	uint32_t nrow = csr_interface->nrow;
 	size_t elemsize = csr_interface->elemsize;
 	size_t elemsize = csr_interface->elemsize;
 
 
-	addr_nzval = starpu_allocate_buffer_on_node(dst_node, nnz*elemsize);
+	addr_nzval = starpu_malloc_on_node(dst_node, nnz*elemsize);
 	if (!addr_nzval)
 	if (!addr_nzval)
 		goto fail_nzval;
 		goto fail_nzval;
-	addr_colind = (uint32_t*) starpu_allocate_buffer_on_node(dst_node, nnz*sizeof(uint32_t));
+	addr_colind = (uint32_t*) starpu_malloc_on_node(dst_node, nnz*sizeof(uint32_t));
 	if (!addr_colind)
 	if (!addr_colind)
 		goto fail_colind;
 		goto fail_colind;
-	addr_rowptr = (uint32_t*) starpu_allocate_buffer_on_node(dst_node, (nrow+1)*sizeof(uint32_t));
+	addr_rowptr = (uint32_t*) starpu_malloc_on_node(dst_node, (nrow+1)*sizeof(uint32_t));
 	if (!addr_rowptr)
 	if (!addr_rowptr)
 		goto fail_rowptr;
 		goto fail_rowptr;
 
 
@@ -242,9 +242,9 @@ static ssize_t allocate_csr_buffer_on_node(void *data_interface_, unsigned dst_n
 	return allocated_memory;
 	return allocated_memory;
 
 
 fail_rowptr:
 fail_rowptr:
-	starpu_free_buffer_on_node(dst_node, (uintptr_t) addr_colind, nnz*sizeof(uint32_t));
+	starpu_free_on_node(dst_node, (uintptr_t) addr_colind, nnz*sizeof(uint32_t));
 fail_colind:
 fail_colind:
-	starpu_free_buffer_on_node(dst_node, addr_nzval, nnz*elemsize);
+	starpu_free_on_node(dst_node, addr_nzval, nnz*elemsize);
 fail_nzval:
 fail_nzval:
 	/* allocation failed */
 	/* allocation failed */
 	return -ENOMEM;
 	return -ENOMEM;
@@ -257,9 +257,9 @@ static void free_csr_buffer_on_node(void *data_interface, unsigned node)
 	uint32_t nrow = csr_interface->nrow;
 	uint32_t nrow = csr_interface->nrow;
 	size_t elemsize = csr_interface->elemsize;
 	size_t elemsize = csr_interface->elemsize;
 
 
-	starpu_free_buffer_on_node(node, csr_interface->nzval, nnz*elemsize);
+	starpu_free_on_node(node, csr_interface->nzval, nnz*elemsize);
-	starpu_free_buffer_on_node(node, (uintptr_t) csr_interface->colind, nnz*sizeof(uint32_t));
+	starpu_free_on_node(node, (uintptr_t) csr_interface->colind, nnz*sizeof(uint32_t));
-	starpu_free_buffer_on_node(node, (uintptr_t) csr_interface->rowptr, (nrow+1)*sizeof(uint32_t));
+	starpu_free_on_node(node, (uintptr_t) csr_interface->rowptr, (nrow+1)*sizeof(uint32_t));
 }
 }
 
 
 /* as not all platform easily have a BLAS lib installed ... */
 /* as not all platform easily have a BLAS lib installed ... */

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

@@ -265,7 +265,7 @@ static ssize_t allocate_matrix_buffer_on_node(void *data_interface_, unsigned ds
 
 
 	ssize_t allocated_memory;
 	ssize_t allocated_memory;
 
 
-	handle = starpu_allocate_buffer_on_node(dst_node, nx*ny*elemsize);
+	handle = starpu_malloc_on_node(dst_node, nx*ny*elemsize);
 
 
 	if (!handle)
 	if (!handle)
 		return -ENOMEM;
 		return -ENOMEM;
@@ -291,7 +291,7 @@ static void free_matrix_buffer_on_node(void *data_interface, unsigned node)
 	uint32_t ny = matrix_interface->ny;
 	uint32_t ny = matrix_interface->ny;
 	size_t elemsize = matrix_interface->elemsize;
 	size_t elemsize = matrix_interface->elemsize;
 
 
-	starpu_free_buffer_on_node(node, matrix_interface->ptr, nx*ny*elemsize);
+	starpu_free_on_node(node, matrix_interface->ptr, nx*ny*elemsize);
 }
 }
 
 
 #ifdef STARPU_USE_CUDA
 #ifdef STARPU_USE_CUDA

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

@@ -243,14 +243,14 @@ static ssize_t allocate_multiformat_buffer_on_node(void *data_interface_, unsign
 
 
 	size = multiformat_interface->nx * multiformat_interface->ops->cpu_elemsize;
 	size = multiformat_interface->nx * multiformat_interface->ops->cpu_elemsize;
 	allocated_memory += size;
 	allocated_memory += size;
-	addr = starpu_allocate_buffer_on_node(dst_node, size);
+	addr = starpu_malloc_on_node(dst_node, size);
 	if (!addr)
 	if (!addr)
 		goto fail_cpu;
 		goto fail_cpu;
 	multiformat_interface->cpu_ptr = (void *) addr;
 	multiformat_interface->cpu_ptr = (void *) addr;
 #ifdef STARPU_USE_CUDA
 #ifdef STARPU_USE_CUDA
 	size = multiformat_interface->nx * multiformat_interface->ops->cuda_elemsize;
 	size = multiformat_interface->nx * multiformat_interface->ops->cuda_elemsize;
 	allocated_memory += size;
 	allocated_memory += size;
-	addr = starpu_allocate_buffer_on_node(dst_node, size);
+	addr = starpu_malloc_on_node(dst_node, size);
 	if (!addr)
 	if (!addr)
 		goto fail_cuda;
 		goto fail_cuda;
 	multiformat_interface->cuda_ptr = (void *) addr;
 	multiformat_interface->cuda_ptr = (void *) addr;
@@ -258,7 +258,7 @@ static ssize_t allocate_multiformat_buffer_on_node(void *data_interface_, unsign
 #ifdef STARPU_USE_OPENCL
 #ifdef STARPU_USE_OPENCL
 	size = multiformat_interface->nx * multiformat_interface->ops->opencl_elemsize;
 	size = multiformat_interface->nx * multiformat_interface->ops->opencl_elemsize;
 	allocated_memory += size;
 	allocated_memory += size;
-	addr = starpu_allocate_buffer_on_node(dst_node, size);
+	addr = starpu_malloc_on_node(dst_node, size);
 	if (!addr)
 	if (!addr)
 		goto fail_opencl;
 		goto fail_opencl;
 	multiformat_interface->opencl_ptr = (void *) addr;
 	multiformat_interface->opencl_ptr = (void *) addr;
@@ -269,13 +269,13 @@ static ssize_t allocate_multiformat_buffer_on_node(void *data_interface_, unsign
 #ifdef STARPU_USE_OPENCL
 #ifdef STARPU_USE_OPENCL
 fail_opencl:
 fail_opencl:
 #ifdef STARPU_USE_CUDA
 #ifdef STARPU_USE_CUDA
-	starpu_free_buffer_on_node(dst_node, (uintptr_t) multiformat_interface->cuda_ptr, multiformat_interface->nx * multiformat_interface->ops->cuda_elemsize);
+	starpu_free_on_node(dst_node, (uintptr_t) multiformat_interface->cuda_ptr, multiformat_interface->nx * multiformat_interface->ops->cuda_elemsize);
 #endif
 #endif
 #endif
 #endif
 #ifdef STARPU_USE_CUDA
 #ifdef STARPU_USE_CUDA
 fail_cuda:
 fail_cuda:
 #endif
 #endif
-	starpu_free_buffer_on_node(dst_node, (uintptr_t) multiformat_interface->cpu_ptr, multiformat_interface->nx * multiformat_interface->ops->cpu_elemsize);
+	starpu_free_on_node(dst_node, (uintptr_t) multiformat_interface->cpu_ptr, multiformat_interface->nx * multiformat_interface->ops->cpu_elemsize);
 fail_cpu:
 fail_cpu:
 	return -ENOMEM;
 	return -ENOMEM;
 }
 }
@@ -285,16 +285,16 @@ static void free_multiformat_buffer_on_node(void *data_interface, unsigned node)
 	struct starpu_multiformat_interface *multiformat_interface;
 	struct starpu_multiformat_interface *multiformat_interface;
 	multiformat_interface = (struct starpu_multiformat_interface *) data_interface;
 	multiformat_interface = (struct starpu_multiformat_interface *) data_interface;
 
 
-	starpu_free_buffer_on_node(node, (uintptr_t) multiformat_interface->cpu_ptr,
+	starpu_free_on_node(node, (uintptr_t) multiformat_interface->cpu_ptr,
 				   multiformat_interface->nx * multiformat_interface->ops->cpu_elemsize);
 				   multiformat_interface->nx * multiformat_interface->ops->cpu_elemsize);
 	multiformat_interface->cpu_ptr = NULL;
 	multiformat_interface->cpu_ptr = NULL;
 #ifdef STARPU_USE_CUDA
 #ifdef STARPU_USE_CUDA
-	starpu_free_buffer_on_node(node, (uintptr_t) multiformat_interface->cuda_ptr,
+	starpu_free_on_node(node, (uintptr_t) multiformat_interface->cuda_ptr,
 				   multiformat_interface->nx * multiformat_interface->ops->cuda_elemsize);
 				   multiformat_interface->nx * multiformat_interface->ops->cuda_elemsize);
 	multiformat_interface->cuda_ptr = NULL;
 	multiformat_interface->cuda_ptr = NULL;
 #endif
 #endif
 #ifdef STARPU_USE_OPENCL
 #ifdef STARPU_USE_OPENCL
-	starpu_free_buffer_on_node(node, (uintptr_t) multiformat_interface->opencl_ptr,
+	starpu_free_on_node(node, (uintptr_t) multiformat_interface->opencl_ptr,
 				   multiformat_interface->nx * multiformat_interface->ops->opencl_elemsize);
 				   multiformat_interface->nx * multiformat_interface->ops->opencl_elemsize);
 	multiformat_interface->opencl_ptr = NULL;
 	multiformat_interface->opencl_ptr = NULL;
 #endif
 #endif

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

@@ -150,7 +150,7 @@ static ssize_t allocate_variable_buffer_on_node(void *data_interface_, unsigned
 {
 {
 	struct starpu_variable_interface *variable_interface = (struct starpu_variable_interface *) data_interface_;
 	struct starpu_variable_interface *variable_interface = (struct starpu_variable_interface *) data_interface_;
 	size_t elemsize = variable_interface->elemsize;
 	size_t elemsize = variable_interface->elemsize;
-	uintptr_t addr = starpu_allocate_buffer_on_node(dst_node, elemsize);
+	uintptr_t addr = starpu_malloc_on_node(dst_node, elemsize);
 
 
 	if (!addr)
 	if (!addr)
 		return -ENOMEM;
 		return -ENOMEM;
@@ -164,7 +164,7 @@ static ssize_t allocate_variable_buffer_on_node(void *data_interface_, unsigned
 static void free_variable_buffer_on_node(void *data_interface, unsigned 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;
 	struct starpu_variable_interface *variable_interface = (struct starpu_variable_interface *) data_interface;
-	starpu_free_buffer_on_node(node, variable_interface->ptr, variable_interface->elemsize);
+	starpu_free_on_node(node, variable_interface->ptr, variable_interface->elemsize);
 }
 }
 
 
 static int copy_any_to_any(void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node, void *async_data)
 static int copy_any_to_any(void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node, void *async_data)

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

@@ -189,7 +189,7 @@ static ssize_t allocate_vector_buffer_on_node(void *data_interface_, unsigned ds
 
 
 	ssize_t allocated_memory;
 	ssize_t allocated_memory;
 
 
-	handle = starpu_allocate_buffer_on_node(dst_node, nx*elemsize);
+	handle = starpu_malloc_on_node(dst_node, nx*elemsize);
 	if (!handle)
 	if (!handle)
 		return -ENOMEM;
 		return -ENOMEM;
 
 
@@ -212,7 +212,7 @@ static void free_vector_buffer_on_node(void *data_interface, unsigned node)
 	uint32_t nx = vector_interface->nx;
 	uint32_t nx = vector_interface->nx;
 	size_t elemsize = vector_interface->elemsize;
 	size_t elemsize = vector_interface->elemsize;
 
 
-	starpu_free_buffer_on_node(node, vector_interface->ptr, nx*elemsize);
+	starpu_free_on_node(node, vector_interface->ptr, nx*elemsize);
 }
 }
 
 
 static int copy_any_to_any(void *src_interface, unsigned src_node,
 static int copy_any_to_any(void *src_interface, unsigned src_node,

+ 2 - 2
src/datawizard/malloc.c

@@ -288,7 +288,7 @@ static _starpu_pthread_mutex_t opencl_alloc_mutex = _STARPU_PTHREAD_MUTEX_INITIA
 #endif
 #endif
 
 
 uintptr_t
 uintptr_t
-starpu_allocate_buffer_on_node(unsigned dst_node, size_t size)
+starpu_malloc_on_node(unsigned dst_node, size_t size)
 {
 {
 	uintptr_t addr = 0;
 	uintptr_t addr = 0;
 
 
@@ -370,7 +370,7 @@ starpu_allocate_buffer_on_node(unsigned dst_node, size_t size)
 }
 }
 
 
 void
 void
-starpu_free_buffer_on_node(unsigned dst_node, uintptr_t addr, size_t size)
+starpu_free_on_node(unsigned dst_node, uintptr_t addr, size_t size)
 {
 {
 	enum starpu_node_kind kind = starpu_node_get_kind(dst_node);
 	enum starpu_node_kind kind = starpu_node_get_kind(dst_node);
 	switch(kind)
 	switch(kind)

+ 3 - 1
tools/dev/rename.sed

@@ -152,7 +152,9 @@ s/\bstarpu_pack_cl_args\b/starpu_codelet_pack_args/g
 s/\bstarpu_unpack_cl_args\b/starpu_codelet_unpack_args/g
 s/\bstarpu_unpack_cl_args\b/starpu_codelet_unpack_args/g
 s/\bstarpu_task_deinit\b/starpu_task_clean/g
 s/\bstarpu_task_deinit\b/starpu_task_clean/g
 
 
-
 s/\bstarpu_helper_cublas_init\b/starpu_cublas_init/g
 s/\bstarpu_helper_cublas_init\b/starpu_cublas_init/g
 s/\bstarpu_helper_cublas_shutdown\b/starpu_cublas_shutdown/g
 s/\bstarpu_helper_cublas_shutdown\b/starpu_cublas_shutdown/g
 
 
+s/\bstarpu_allocate_buffer_on_node\b/starpu_malloc_on_node/g
+s/\bstarpu_free_buffer_on_node\b/starpu_free_on_node/g
+