Loading...
Searching...
No Matches
Out Of Core

## Data Structures

struct | starpu_disk_ops

## Macros

#define | STARPU_DISK_SIZE_MIN

## Functions

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, starpu_ssize_t size)

## Variables

struct starpu_disk_ops | starpu_disk_stdio_ops
struct starpu_disk_ops | starpu_disk_hdf5_ops
struct starpu_disk_ops | starpu_disk_unistd_ops
struct starpu_disk_ops | starpu_disk_unistd_o_direct_ops
struct starpu_disk_ops | starpu_disk_leveldb_ops
int | starpu_disk_swap_node

## Detailed Description

## Data Structure Documentation

## starpu_disk_ops

struct starpu_disk_ops

Set of functions to manipulate data on disk. See Disk functions for more details.

Data Fields
void *(*)(void *parameter, starpu_ssize_t size) | plug | Connect a disk memory at location `parameter` with size `size`, and return a base as void*, which will be passed by StarPU to all other methods.
void(*)(void *base) | unplug | Disconnect a disk memory `base`.
int(*)(unsigned node, void *base) | bandwidth | Measure the bandwidth and the latency for the disk `node` and save it. Returns 1 if it could measure it.
void *(*)(void *base, size_t size) | alloc | Create a new location for data of size `size`. Return an opaque object pointer.
void(*)(void *base, void *obj, size_t size) | free | Free a data `obj` previously allocated with starpu_disk_ops::alloc.
void *(*)(void *base, void *pos, size_t size) | open | Open an existing location of data, at a specific position `pos` dependent on the backend.
void(*)(void *base, void *obj, size_t size) | close | Close, without deleting it, a location of data `obj`.
int(*)(void *base, void *obj, void *buf, off_t offset, size_t size) | read | Read `size` bytes of data from `obj` in `base`, at offset `offset`, and put into `buf`. Return the actual number of read bytes.
int(*)(void *base, void *obj, const void *buf, off_t offset, size_t size) | write | Write `size` bytes of data to `obj` in `base`, at offset `offset`, from `buf`. Return 0 on success.
int(*)(void *base, void *obj, void **ptr, size_t *size, unsigned dst_node) | full_read | Read all data from `obj` of `base`, from offset 0. Returns it in an allocated buffer `ptr`, of size `size`
int(*)(void *base, void *obj, void *ptr, size_t size) | full_write | Write data in `ptr` to `obj` of `base`, from offset 0, and truncate `obj` to `size`, so that a `full_read` will get it.
void *(*)(void *base, void *obj, void *buf, off_t offset, size_t size) | async_write | Asynchronously write `size` bytes of data to `obj` in `base`, at offset `offset`, from `buf`. Return a void* pointer that StarPU will pass to `xxx_request` methods for testing for the completion.
void *(*)(void *base, void *obj, void *buf, off_t offset, size_t size) | async_read | Asynchronously read `size` bytes of data from `obj` in `base`, at offset `offset`, and put into `buf`. Return a void* pointer that StarPU will pass to `xxx_request` methods for testing for the completion.
void *(*)(void *base, void *obj, void **ptr, size_t *size, unsigned dst_node) | async_full_read | Read all data from `obj` of `base`, from offset 0. Return it in an allocated buffer `ptr`, of size `size`
void *(*)(void *base, void *obj, void *ptr, size_t size) | async_full_write | Write data in `ptr` to `obj` of `base`, from offset 0, and truncate `obj` to `size`, so that a starpu_disk_ops::full_read will get it.
void *(*)(void *base_src, void *obj_src, off_t offset_src, void *base_dst, void *obj_dst, off_t offset_dst, size_t size) | copy | Copy from offset `offset_src` of disk object `obj_src` in `base_src` to offset `offset_dst` of disk object `obj_dst` in `base_dst`. Return a void* pointer that StarPU will pass to `xxx_request` methods for testing for the completion.
void(*)(void *async_channel) | wait_request | Wait for completion of request `async_channel` returned by a previous asynchronous read, write or copy.
int(*)(void *async_channel) | test_request | Test for completion of request `async_channel` returned by a previous asynchronous read, write or copy. Return 1 on completion, 0 otherwise.
void(*)(void *async_channel) | free_request | Free the request allocated by a previous asynchronous read, write or copy.

## Macro Definition Documentation

## STARPU_DISK_SIZE_MIN

#define STARPU_DISK_SIZE_MIN

Minimum size of a registered disk. The size of a disk is the last parameter of the function starpu_disk_register().

## Function Documentation

## starpu_disk_close()

void starpu_disk_close | ( | unsigned | node,
|  | void * | obj,
|  | size_t | size )

Close an existing data opened with starpu_disk_open(). See Introduction for more details.

## starpu_disk_open()

void * starpu_disk_open | ( | unsigned | node,
|  | void * | pos,
|  | size_t | size )

Open an existing file memory in a disk node. `size` is the size of the file. `pos` is the specific position dependent on the backend, given to the `open` method of the disk operations. Return an opaque object pointer. See Introduction for more details.

## starpu_disk_register()

int starpu_disk_register | ( | struct starpu_disk_ops * | func,
|  | void * | parameter,
|  | starpu_ssize_t | size )

Register a disk memory node with a set of functions to manipulate data. The `plug` member of `func` will be passed `parameter`, and return a `base` which will be passed to all `func` methods.
SUCCESS: return the disk node.
FAIL: return an error code.
`size` must be at least STARPU_DISK_SIZE_MIN bytes ! `size` being negative means infinite size.

See Introduction for more details.

## Variable Documentation

## starpu_disk_stdio_ops

struct starpu_disk_ops starpu_disk_stdio_ops

extern

Use the stdio library (fwrite, fread...) to read/write on disk.

Warning: It creates one file per allocation !

Do not support asynchronous transfers.

## starpu_disk_hdf5_ops

struct starpu_disk_ops starpu_disk_hdf5_ops

extern

Use the HDF5 library.

It doesn't support multiple opening from different processes.

You may only allow one process to write in the HDF5 file.

If HDF5 library is not compiled with –thread-safe you can't open more than one HDF5 file at the same time.

## starpu_disk_unistd_ops

struct starpu_disk_ops starpu_disk_unistd_ops

extern

Use the unistd library (write, read...) to read/write on disk.

Warning: It creates one file per allocation !

## starpu_disk_unistd_o_direct_ops

struct starpu_disk_ops starpu_disk_unistd_o_direct_ops

extern

Use the unistd library (write, read...) to read/write on disk with the O_DIRECT flag.

Warning: It creates one file per allocation !

Only available on Linux systems.

## starpu_disk_leveldb_ops

struct starpu_disk_ops starpu_disk_leveldb_ops

extern

Use the leveldb created by Google. More information at https://code.google.com/p/leveldb/ Do not support asynchronous transfers.

## starpu_disk_swap_node

int starpu_disk_swap_node

extern

Contain the node number of the disk swap, if set up through the STARPU_DISK_SWAP variable.