Stxxl  1.4.0
Classes | Modules | Defines | Functions
I/O primitives layer
Collaboration diagram for I/O primitives layer:

Classes

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

Modules

 File implementations

Defines

#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.

Functions

std::ostream & stxxl::operator<< (std::ostream &o, const stats_data &s)
std::ostream & stxxl::operator<< (std::ostream &o, const stats &s)
std::string stxxl::format_with_SI_IEC_unit_multiplier (uint64 number, const char *unit, int multiplier)
std::string stxxl::add_IEC_binary_multiplier (uint64 number, const char *unit="")
std::string stxxl::add_SI_multiplier (uint64 number, const char *unit="")
std::ostream & stxxl::operator<< (std::ostream &out, const request &req)
template<class request_iterator_ >
void stxxl::wait_all (request_iterator_ reqs_begin, request_iterator_ reqs_end)
 Collection of functions to track statuses of a number of requests.
void stxxl::wait_all (request_ptr req_array[], int count)
 Suspends calling thread until all given requests are completed.
template<class request_iterator_ >
std::iterator_traits
< request_iterator_ >
::difference_type 
stxxl::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.
template<class request_iterator_ >
request_iterator_ stxxl::poll_any (request_iterator_ reqs_begin, request_iterator_ reqs_end)
 Polls requests.
bool stxxl::poll_any (request_ptr req_array[], int count, int &index)
 Polls requests.
template<class request_iterator_ >
request_iterator_ stxxl::wait_any (request_iterator_ reqs_begin, request_iterator_ reqs_end)
 Suspends calling thread until any of requests is completed.
int stxxl::wait_any (request_ptr req_array[], int count)
 Suspends calling thread until any of requests is completed.

Detailed Description

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


Define Documentation

#define BLOCK_ALIGN   4096

Definition at line 33 of file request.h.

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

Function Documentation

std::string stxxl::add_IEC_binary_multiplier ( uint64  number,
const char *  unit = "" 
) [inline]
Examples:
io/test_io.cpp, and io/test_io_sizes.cpp.

Definition at line 628 of file iostats.h.

References stxxl::format_with_SI_IEC_unit_multiplier().

Referenced by main(), and run_test().

std::string stxxl::add_SI_multiplier ( uint64  number,
const char *  unit = "" 
) [inline]
Examples:
io/test_io.cpp.

Definition at line 633 of file iostats.h.

References stxxl::format_with_SI_IEC_unit_multiplier().

Referenced by main().

template<class request_iterator_ >
std::iterator_traits<request_iterator_>::difference_type stxxl::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.

Definition at line 59 of file request_operations.h.

Referenced by main().

std::string stxxl::format_with_SI_IEC_unit_multiplier ( uint64  number,
const char *  unit,
int  multiplier 
)

Definition at line 325 of file iostats.cpp.

Referenced by stxxl::add_IEC_binary_multiplier(), and stxxl::add_SI_multiplier().

std::ostream& stxxl::operator<< ( std::ostream &  out,
const request &  req 
) [inline]

Definition at line 138 of file request.h.

References stxxl::request::print().

std::ostream & stxxl::operator<< ( std::ostream &  o,
const stats_data &  s 
)
std::ostream& stxxl::operator<< ( std::ostream &  o,
const stats &  s 
) [inline]

Definition at line 620 of file iostats.h.

template<class request_iterator_ >
request_iterator_ stxxl::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

Definition at line 77 of file request_operations.h.

Referenced by stxxl::poll_any().

bool stxxl::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

Definition at line 95 of file request_operations.h.

References stxxl::count(), and stxxl::poll_any().

template<class request_iterator_ >
void stxxl::wait_all ( request_iterator_  reqs_begin,
request_iterator_  reqs_end 
)
void stxxl::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

Definition at line 45 of file request_operations.h.

References stxxl::wait_all().

template<class request_iterator_ >
request_iterator_ stxxl::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

Definition at line 108 of file request_operations.h.

References stxxl::onoff_switch::wait_for_on().

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

int stxxl::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

Definition at line 154 of file request_operations.h.

References stxxl::wait_any().

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines