STXXL
1.4.1
|
Encapsulation of an I/O request, queues for requests and threads to process them. More...
Classes | |
class | stxxl::disk_queues |
Encapsulates disk queues. More... | |
class | stxxl::linuxaio_queue |
Queue for linuxaio_file(s) More... | |
class | stxxl::linuxaio_request |
Request for an linuxaio_file. More... | |
class | stxxl::request |
Request object encapsulating basic properties like file and offset. More... | |
class | stxxl::request_interface |
Functional interface of a request. More... | |
class | stxxl::request_queue |
Interface of a request_queue to which requests can be added and canceled. More... | |
class | stxxl::request_queue_impl_1q |
Implementation of a local request queue having only one queue for both read and write requests, thus having only one thread. More... | |
class | stxxl::request_queue_impl_qwqr |
Implementation of a local request queue having two queues, one for read and one for write requests, thus having two threads. This is the default implementation. More... | |
class | stxxl::request_queue_impl_worker |
Implementation of request queue worker threads. Worker threads can be started by start_thread and stopped with stop_thread. The queue state is checked before termination and updated afterwards. More... | |
class | stxxl::request_with_state |
Request with completion state. More... | |
class | stxxl::request_with_waiters |
Request that is aware of threads waiting for it to complete. More... | |
class | stxxl::serving_request |
Request which serves an I/O by calling the synchronous routine of the file. More... | |
Macros | |
#define | STXXL_BLOCK_ALIGN 4096 |
Typedefs | |
typedef counting_ptr< request > | stxxl::request_ptr |
A reference counting pointer for request . More... | |
Functions | |
template<class RequestIterator > | |
std::iterator_traits < RequestIterator > ::difference_type | stxxl::cancel_all (RequestIterator reqs_begin, RequestIterator 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... | |
std::ostream & | stxxl::operator<< (std::ostream &out, const request &req) |
template<class RequestIterator > | |
RequestIterator | stxxl::poll_any (RequestIterator reqs_begin, RequestIterator reqs_end) |
Polls requests. More... | |
bool | stxxl::poll_any (request_ptr req_array[], size_t count, size_t &index) |
Polls requests. More... | |
template<class RequestIterator > | |
void | stxxl::wait_all (RequestIterator reqs_begin, RequestIterator reqs_end) |
Collection of functions to track statuses of a number of requests. More... | |
void | stxxl::wait_all (request_ptr req_array[], size_t count) |
Suspends calling thread until all given requests are completed. More... | |
template<class RequestIterator > | |
RequestIterator | stxxl::wait_any (RequestIterator reqs_begin, RequestIterator reqs_end) |
Suspends calling thread until any of requests is completed. More... | |
size_t | stxxl::wait_any (request_ptr req_array[], size_t count) |
Suspends calling thread until any of requests is completed. More... | |
Encapsulation of an I/O request, queues for requests and threads to process them.
#define STXXL_BLOCK_ALIGN 4096 |
Definition at line 33 of file request.h.
Referenced by stxxl::request::check_alignment(), stxxl::mem_file::discard(), stxxl::fileperblock_file< base_file_type >::lock(), and stxxl::typed_block< RawSize, Type, NRef, MetaInfoType >::typed_block().
typedef counting_ptr<request> stxxl::request_ptr |
std::iterator_traits<RequestIterator>::difference_type stxxl::cancel_all | ( | RequestIterator | reqs_begin, |
RequestIterator | 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.
reqs_begin | begin of request sequence |
reqs_end | end of request sequence |
Definition at line 58 of file request_operations.h.
|
inline |
Definition at line 107 of file request.h.
References stxxl::request::print().
RequestIterator stxxl::poll_any | ( | RequestIterator | reqs_begin, |
RequestIterator | reqs_end | ||
) |
Polls requests.
reqs_begin | begin of request sequence to poll |
reqs_end | end of request sequence to poll |
true
if any of requests is completed, then index contains valid value, otherwise false
Definition at line 75 of file request_operations.h.
Referenced by stxxl::poll_any().
|
inline |
Polls requests.
req_array | array of request_ptr objects |
count | size of req_array |
index | contains index of the first completed request if any |
true
if any of requests is completed, then index contains valid value, otherwise false
Definition at line 92 of file request_operations.h.
References stxxl::count(), and stxxl::poll_any().
void stxxl::wait_all | ( | RequestIterator | reqs_begin, |
RequestIterator | reqs_end | ||
) |
Collection of functions to track statuses of a number of requests.
Suspends calling thread until all given requests are completed.
reqs_begin | begin of request sequence to wait for |
reqs_end | end of request sequence to wait for |
Definition at line 34 of file request_operations.h.
Referenced by stxxl::ksort_local::check_ksorted_runs(), stxxl::sort_local::check_sorted_runs(), stxxl::stream::check_sorted_runs(), stxxl::stream::basic_runs_creator< Input, CompareType, BlockSize, AllocStr >::compute_result(), stxxl::sort_local::create_runs(), stxxl::ksort_local::create_runs(), stxxl::ksort(), stxxl::normal_stack< StackConfig >::pop(), stxxl::grow_shrink_stack< StackConfig >::pop(), stxxl::normal_stack< StackConfig >::push(), stxxl::vector< ValueType >::read_page(), stxxl::stl_in_memory_sort(), stxxl::wait_all(), stxxl::vector< ValueType >::write_page(), and stxxl::grow_shrink_stack< StackConfig >::~grow_shrink_stack().
|
inline |
Suspends calling thread until all given requests are completed.
req_array | array of request_ptr objects |
count | size of req_array |
Definition at line 43 of file request_operations.h.
References stxxl::wait_all().
RequestIterator stxxl::wait_any | ( | RequestIterator | reqs_begin, |
RequestIterator | reqs_end | ||
) |
Suspends calling thread until any of requests is completed.
reqs_begin | begin of request sequence to wait for |
reqs_end | end of request sequence to wait for |
Definition at line 104 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().
|
inline |
Suspends calling thread until any of requests is completed.
req_array | array of request_ptr objects |
count | size of req_array |
Definition at line 149 of file request_operations.h.
References stxxl::wait_any().