24 this->
Core ((
int)pow (2, 0));
25 this->
Core ((
int)pow (2, 1));
26 this->
Core ((
int)pow (2, 2));
27 this->
Core ((
int)pow (2, 3));
28 this->
Core ((
int)pow (2, 4));
31 this->
Core ((
int)pow (2, 5));
32 this->
Core ((
int)pow (2, 6));
33 this->
Core ((
int)pow (2, 7));
34 this->
Core ((
int)pow (2, 8));
35 this->
Core ((
int)pow (2, 9));
38 this->
Core ((
int)pow (2, 10));
39 this->
Core ((
int)pow (2, 11));
40 this->
Core ((
int)pow (2, 12));
41 this->
Core ((
int)pow (2, 13));
42 this->
Core ((
int)pow (2, 14));
45 this->
Core ((
int)pow (2, 15));
46 this->
Core ((
int)pow (2, 16));
47 this->
Core ((
int)pow (2, 17));
48 this->
Core ((
int)pow (2, 18));
49 this->
Core ((
int)pow (2, 19));
50 this->
Core ((
int)pow (2, 20));
53 this->
Core ((
int)pow (2, 21));
54 this->
Core ((
int)pow (2, 22));
55 this->
Core ((
int)pow (2, 23));
56 this->
Core ((
int)pow (2, 24));
57 this->
Core ((
int)pow (2, 25));
77 BYTE* byDummy =
new BYTE[param1];
78 ZeroMemory (byDummy, param1 *
sizeof (BYTE));
81 file.
Create (_T (
".\\test.bin"), GENERIC_WRITE, FILE_SHARE_WRITE, CREATE_ALWAYS);
85 DWORD dwWritten = file.
Write (byDummy, param1 *
sizeof (BYTE));
86 writeSize += dwWritten;
95 double writePerformance = ((writeSize / 1024 / 1024) / (Q.
PastTime () / 1000));
97 _console.
Format (_T (
"%10dbytes単位の書き込み 書き込み量:%10d 書き込み時間:%10.4fmsec 結果:%9.4fMBytes/sec\n"),
98 param1, writeSize, Q.
PastTime (), writePerformance);
110 BYTE* byDummy =
new BYTE[param1];
111 ZeroMemory (byDummy, param1 *
sizeof (BYTE));
114 file.
Create (_T (
".\\test.bin"), GENERIC_READ, FILE_SHARE_READ, OPEN_EXISTING);
118 DWORD dwRead = file.
Read (byDummy, param1 *
sizeof (BYTE));
128 double readPerformance = ((readSize / 1024 / 1024) / (Q.
PastTime () / 1000));
130 _console.
Format (_T (
"%10dbytes単位の書き込み 書き込み量:%10d 書き込み時間:%10.4fmsec 結果:%9.4fMBytes/sec\n"),
131 param1, readSize, Q.
PastTime (), readPerformance);
VOID APIENTRY Format(LPCTSTR format,...) const
コンソールに文字を出力します。
ファイルIOに関するWindowsAPIを集約したクラス
BOOL APIENTRY Create(LPCTSTR lpctszFileName, DWORD dwDesiredAccess, DWORD dwShareMode, DWORD dwCreationDisposition)
ファイルを作成、オープンします。
BOOL APIENTRY Close()
使用しなくなったハンドルはこれでクローズします。
DWORD APIENTRY Read(LPVOID lpvBuffer, DWORD dwSize) const
HANDLEを使ってデータを読み込みます。
DWORD APIENTRY Write(LPCVOID lpcvBuffer, DWORD dwSize) const
HANDLEを使ってデータを書き込みます。