13 #ifndef STXXL_SIMDISK_FILE_HEADER
14 #define STXXL_SIMDISK_FILE_HEADER
16 #ifdef STXXL_BOOST_CONFIG
17 #include <boost/config.hpp>
26 #include <stxxl/bits/io/ufs_file.h>
29 __STXXL_BEGIN_NAMESPACE
34 #define AVERAGE_SPEED (15 * 1024 * 1024)
36 class DiskGeometry :
private noncopyable
46 double sustained_data_rate;
47 inline Zone(
int _first_sector) : first_sector(_first_sector)
54 int _sectors,
double _rate) :
57 first_sector(_first_sector),
59 sustained_data_rate(_rate)
64 inline bool operator () (
const Zone & a,
const Zone & b)
const
66 return a.first_sector < b.first_sector;
76 double head_switch_time;
77 double cyl_switch_time;
78 double revolution_time;
79 double interface_speed;
80 std::set<Zone, ZoneCmp> zones;
82 void add_zone(
int & first_cyl,
int last_cyl,
83 int sec_per_track,
int & first_sect);
88 double get_delay(stxxl::int64 offset,
size_t size);
90 inline ~DiskGeometry()
95 class IC35L080AVVA07 :
public DiskGeometry
115 std::cout <<
"Please, make sure that '" << filename <<
116 "' is resided on swap memory partition!" <<
119 request_ptr aread(
void * buffer, stxxl::int64 pos,
size_t bytes,
121 request_ptr awrite(
void * buffer, stxxl::int64 pos,
size_t bytes,
123 void set_size(stxxl::int64 newsize);
134 size_t b, request_type t,
154 __STXXL_END_NAMESPACE
156 #endif // #ifndef BOOST_MSVC
158 #endif // !STXXL_SIMDISK_FILE_HEADER