15 #ifndef STXXL_IO_SIMDISK_FILE_HEADER
16 #define STXXL_IO_SIMDISK_FILE_HEADER
20 #ifndef STXXL_HAVE_SIMDISK_FILE
22 #define STXXL_HAVE_SIMDISK_FILE STXXL_HAVE_MMAP_FILE
25 #if STXXL_HAVE_SIMDISK_FILE
51 inline Zone(
int _first_sector) : first_sector(_first_sector)
65 sect_per_track(_sect_per_track),
67 first_sector(_first_sector),
69 sustained_data_rate(_rate)
74 inline bool operator () (
const Zone& a,
const Zone& b)
const
92 void add_zone(
int& first_cyl,
int last_cyl,
93 int sec_per_track,
int& first_sect);
125 const std::string& filename,
127 int queue_id = DEFAULT_QUEUE,
128 int allocator_id = NO_ALLOCATOR,
129 unsigned int device_id = DEFAULT_DEVICE_ID)
134 std::cout <<
"Please, make sure that '" << filename <<
135 "' is resided on swap memory partition!" <<
138 void serve(
void* buffer, offset_type offset, size_type
bytes,
140 void set_size(offset_type newsize);
141 const char * io_type()
const;
148 #endif // #if STXXL_HAVE_SIMDISK_FILE
150 #endif // !STXXL_IO_SIMDISK_FILE_HEADER
Zone(int _first_sector, int _sectors, double _rate)
sim_disk_file(const std::string &filename, int mode, int queue_id=DEFAULT_QUEUE, int allocator_id=NO_ALLOCATOR, unsigned int device_id=DEFAULT_DEVICE_ID)
Constructs file object.
std::set< Zone, ZoneCmp > zones
Implementation of disk emulation.
request::size_type size_type
the size of a request
Defines interface of file.
double sustained_data_rate
#define STXXL_BEGIN_NAMESPACE
Implementation of some file methods based on serving_request.
static const double s_average_speed
static const size_t bytes
number of bytes in uint_pair
Base for UNIX file system implementations.
request::offset_type offset_type
the offset of a request, also the size of the file
#define STXXL_END_NAMESPACE