|
@@ -9,6 +9,7 @@
|
|
|
@menu
|
|
|
* Versioning::
|
|
|
* Initialization and Termination::
|
|
|
+* Standard memory library::
|
|
|
* Workers' Properties::
|
|
|
* Data Management::
|
|
|
* Data Interfaces::
|
|
@@ -235,6 +236,43 @@ Return 1 if asynchronous data transfers between CPU and OpenCL accelerators
|
|
|
are disabled.
|
|
|
@end deftypefun
|
|
|
|
|
|
+@node Standard memory library
|
|
|
+@section Standard memory library
|
|
|
+
|
|
|
+@deftypefun int starpu_malloc (void **@var{A}, size_t @var{dim})
|
|
|
+This function allocates data of the given size in main memory. It will also try to pin it in
|
|
|
+CUDA or OpenCL, so that data transfers from this buffer can be asynchronous, and
|
|
|
+thus permit data transfer and computation overlapping. The allocated buffer must
|
|
|
+be freed thanks to the @code{starpu_free} function.
|
|
|
+@end deftypefun
|
|
|
+
|
|
|
+@deftypefun void starpu_malloc_set_align (size_t @var{align})
|
|
|
+This functions sets an alignment constraints for @code{starpu_malloc}
|
|
|
+allocations. @var{align} must be a power of two. This is for instance called
|
|
|
+automatically by the OpenCL driver to specify its own alignment constraints.
|
|
|
+@end deftypefun
|
|
|
+
|
|
|
+@deftypefun int starpu_free (void *@var{A})
|
|
|
+This function frees memory which has previously allocated with
|
|
|
+@code{starpu_malloc}.
|
|
|
+@end deftypefun
|
|
|
+
|
|
|
+@deftypefun int starpu_malloc_count (void **@var{A}, size_t @var{dim})
|
|
|
+This function is similar to @code{starpu_malloc}. It only allocates
|
|
|
+memory up to the limit defined by the environment variables
|
|
|
+@code{STARPU_LIMIT_CUDA_devid_MEM}, @code{STARPU_LIMIT_CUDA_MEM},
|
|
|
+@code{STARPU_LIMIT_OPENCL_devid_MEM}, @code{STARPU_LIMIT_OPENCL_MEM}
|
|
|
+and @code{STARPU_LIMIT_CPU_MEM} (@pxref{Limit memory}). If no memory
|
|
|
+is available, it tries to reclaim memory from StarPU.
|
|
|
+Memory allocated through this function needs to be freed thanks to the
|
|
|
+@code{starpu_free_count} function.
|
|
|
+@end deftypefun
|
|
|
+
|
|
|
+@deftypefun int starpu_free_count (void *@var{A}, size_t @var{dim})
|
|
|
+This function frees memory which has previously allocated with
|
|
|
+@code{starpu_malloc_count}.
|
|
|
+@end deftypefun
|
|
|
+
|
|
|
@node Workers' Properties
|
|
|
@section Workers' Properties
|
|
|
|
|
@@ -400,24 +438,6 @@ data).
|
|
|
@node Basic Data Management API
|
|
|
@subsection Basic Data Management API
|
|
|
|
|
|
-@deftypefun int starpu_malloc (void **@var{A}, size_t @var{dim})
|
|
|
-This function allocates data of the given size in main memory. It will also try to pin it in
|
|
|
-CUDA or OpenCL, so that data transfers from this buffer can be asynchronous, and
|
|
|
-thus permit data transfer and computation overlapping. The allocated buffer must
|
|
|
-be freed thanks to the @code{starpu_free} function.
|
|
|
-@end deftypefun
|
|
|
-
|
|
|
-@deftypefun void starpu_malloc_set_align (size_t @var{align})
|
|
|
-This functions sets an alignment constraints for @code{starpu_malloc}
|
|
|
-allocations. @var{align} must be a power of two. This is for instance called
|
|
|
-automatically by the OpenCL driver to specify its own alignment constraints.
|
|
|
-@end deftypefun
|
|
|
-
|
|
|
-@deftypefun int starpu_free (void *@var{A})
|
|
|
-This function frees memory which has previously allocated with
|
|
|
-@code{starpu_malloc}.
|
|
|
-@end deftypefun
|
|
|
-
|
|
|
@deftp {Data Type} {enum starpu_access_mode}
|
|
|
This datatype describes a data access mode. The different available modes are:
|
|
|
@table @asis
|