Stxxl  1.3.2
Modules | Classes | Macros | Functions
I/O primitives layer
Collaboration diagram for I/O primitives layer:

Modules

 File implementations
 

Classes

class  disk_queues
 Encapsulates disk queues. More...
 
class  file
 Defines interface of file. More...
 
class  stats
 Collects various I/O statistics. More...
 
class  request
 Request with basic properties like file and offset. More...
 
class  request_interface
 Functional interface of a request. More...
 
class  request_ptr
 Implemented as reference counting smart pointer. More...
 
class  serving_request
 Request which serves an I/O by calling the synchronous routine of the file. More...
 

Macros

#define BLOCK_ALIGN   4096
 
#define STXXL_VERBOSE_request_ptr(msg)   STXXL_VERBOSE3("[" << static_cast<void *>(this) << "] request_ptr::" << msg << " ptr=" << static_cast<void *>(ptr))
 A smart wrapper for request pointer. More...
 

Functions

std::ostream & operator<< (std::ostream &o, const stats_data &s)
 
std::ostream & operator<< (std::ostream &o, const stats &s)
 
std::string format_with_SI_IEC_unit_multiplier (uint64 number, const char *unit="", int multiplier=1000)
 
std::string add_IEC_binary_multiplier (uint64 number, const char *unit="")
 
std::string add_SI_multiplier (uint64 number, const char *unit="")
 
std::ostream & operator<< (std::ostream &out, const request &req)
 
template<class request_iterator_ >
void wait_all (request_iterator_ reqs_begin, request_iterator_ reqs_end)
 Collection of functions to track statuses of a number of requests. More...
 
void wait_all (request_ptr req_array[], int count)
 Suspends calling thread until all given requests are completed. More...
 
template<class request_iterator_ >
std::iterator_traits
< request_iterator_ >
::difference_type 
cancel_all (request_iterator_ reqs_begin, request_iterator_ reqs_end)
 Cancel requests The specified requests are canceled unless already being processed. However, cancelation cannot be guaranteed. Cancelled requests must still be waited for in order to ensure correct operation. More...
 
template<class request_iterator_ >
request_iterator_ poll_any (request_iterator_ reqs_begin, request_iterator_ reqs_end)
 Polls requests. More...
 
bool poll_any (request_ptr req_array[], int count, int &index)
 Polls requests. More...
 
template<class request_iterator_ >
request_iterator_ wait_any (request_iterator_ reqs_begin, request_iterator_ reqs_end)
 Suspends calling thread until any of requests is completed. More...
 
int wait_any (request_ptr req_array[], int count)
 Suspends calling thread until any of requests is completed. More...
 

Detailed Description

Group of classes which enable abstraction from operating system calls and support system-independent interfaces for asynchronous I/O.

Macro Definition Documentation

#define STXXL_VERBOSE_request_ptr (   msg)    STXXL_VERBOSE3("[" << static_cast<void *>(this) << "] request_ptr::" << msg << " ptr=" << static_cast<void *>(ptr))

A smart wrapper for request pointer.

Referenced by request_ptr::operator=(), request_ptr::request_ptr(), and request_ptr::~request_ptr().

Function Documentation

template<class request_iterator_ >
std::iterator_traits<request_iterator_>::difference_type cancel_all ( request_iterator_  reqs_begin,
request_iterator_  reqs_end 
)

Cancel requests The specified requests are canceled unless already being processed. However, cancelation cannot be guaranteed. Cancelled requests must still be waited for in order to ensure correct operation.

Parameters
reqs_beginbegin of request sequence
reqs_endend of request sequence
Returns
number of request canceled
Examples:
io/test_cancel.cpp.
template<class request_iterator_ >
request_iterator_ poll_any ( request_iterator_  reqs_begin,
request_iterator_  reqs_end 
)

Polls requests.

Parameters
reqs_beginbegin of request sequence to poll
reqs_endend of request sequence to poll
indexcontains index of the first completed request if any
Returns
true if any of requests is completed, then index contains valid value, otherwise false

Referenced by poll_any().

bool poll_any ( request_ptr  req_array[],
int  count,
int &  index 
)
inline

Polls requests.

Parameters
req_arrayarray of request_ptr objects
countsize of req_array
indexcontains index of the first completed request if any
Returns
true if any of requests is completed, then index contains valid value, otherwise false

References poll_any().

template<class request_iterator_ >
void wait_all ( request_iterator_  reqs_begin,
request_iterator_  reqs_end 
)

Collection of functions to track statuses of a number of requests.

Suspends calling thread until all given requests are completed

Parameters
reqs_beginbegin of request sequence to wait for
reqs_endend of request sequence to wait for
Examples:
io/test_cancel.cpp, io/test_io.cpp, io/test_io_sizes.cpp, and mng/test_mng.cpp.

Referenced by stream::check_sorted_runs(), ksort(), and wait_all().

void wait_all ( request_ptr  req_array[],
int  count 
)
inline

Suspends calling thread until all given requests are completed.

Parameters
req_arrayarray of request_ptr objects
countsize of req_array

References wait_all().

template<class request_iterator_ >
request_iterator_ wait_any ( request_iterator_  reqs_begin,
request_iterator_  reqs_end 
)

Suspends calling thread until any of requests is completed.

Parameters
reqs_beginbegin of request sequence to wait for
reqs_endend of request sequence to wait for
Returns
index in req_array pointing to the first completed request

Referenced by buffered_writer< typed_block >::get_free_block(), write_pool< BlockType >::steal(), and wait_any().

int wait_any ( request_ptr  req_array[],
int  count 
)
inline

Suspends calling thread until any of requests is completed.

Parameters
req_arrayarray of request_ptr objects
countsize of req_array
Returns
index in req_array pointing to the first completed request

References wait_any().