Compare commits
No commits in common. "297d9c53f3d6323197bdc94873b0b88391fbcd1b" and "a7d977210e4b121758744f36afb8b87fa362e912" have entirely different histories.
297d9c53f3
...
a7d977210e
2
haversine_02/.gitignore
vendored
2
haversine_02/.gitignore
vendored
@ -1,6 +1,4 @@
|
||||
.cache
|
||||
.vscode
|
||||
.idea
|
||||
compile_commands.json
|
||||
count_and_distances
|
||||
pairs.json
|
||||
|
42
haversine_02/.vscode/launch.json
vendored
Normal file
42
haversine_02/.vscode/launch.json
vendored
Normal file
@ -0,0 +1,42 @@
|
||||
{
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Debug clustered generator",
|
||||
"type": "cppdbg",
|
||||
"request": "launch",
|
||||
"cwd": "${workspaceFolder}",
|
||||
"program": "${workspaceFolder}/genhavr",
|
||||
"args": [
|
||||
"--cluster",
|
||||
"10"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Debug uniform generator",
|
||||
"type": "cppdbg",
|
||||
"request": "launch",
|
||||
"cwd": "${workspaceFolder}",
|
||||
"program": "${workspaceFolder}/genhavr",
|
||||
"args": [
|
||||
"10"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Debug processor",
|
||||
"type": "cppdbg",
|
||||
"request": "launch",
|
||||
"cwd": "${workspaceFolder}",
|
||||
"program": "${workspaceFolder}/prochavr",
|
||||
"args": [
|
||||
"${workspaceFolder}/pairs.json"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Debug timer test",
|
||||
"type": "cppdbg",
|
||||
"request": "launch",
|
||||
"cwd": "${workspaceFolder}",
|
||||
"program": "${workspaceFolder}/timer_test"
|
||||
}
|
||||
]
|
||||
}
|
@ -63,11 +63,9 @@ int main(int argc, char *argv[]) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
func_data funcs[] = {
|
||||
{{"WRITE", "WRITE WITH MALLOC"}, test_write},
|
||||
func_data funcs[] = {{{"WRITE", "WRITE WITH MALLOC"}, test_write},
|
||||
{{"READ", "READ WITH MALLOC"}, test_read},
|
||||
{{"FREAD", "FREAD WITH MALLOC"}, test_fread},
|
||||
};
|
||||
{{"FREAD", "FREAD WITH MALLOC"}, test_fread}};
|
||||
|
||||
tester.params.read_size = get_file_length(fp);
|
||||
tester.params.read_count = 1;
|
||||
@ -95,11 +93,11 @@ void test_fread(reptester *tester, alloc_type type) {
|
||||
return;
|
||||
}
|
||||
|
||||
handle_alloc(tester, type);
|
||||
|
||||
u64 start = read_cpu_timer();
|
||||
u64 fault_count_start = page_fault_count();
|
||||
|
||||
handle_alloc(tester, type);
|
||||
|
||||
u64 obj_count = fread(tester->params.buffer, tester->params.read_size,
|
||||
tester->params.read_count, fp);
|
||||
|
||||
@ -128,13 +126,13 @@ void test_read(reptester *tester, alloc_type type) {
|
||||
return;
|
||||
}
|
||||
|
||||
u64 start = read_cpu_timer();
|
||||
u64 fault_count_start = page_fault_count();
|
||||
|
||||
handle_alloc(tester, type);
|
||||
|
||||
i32 fd = fileno(fp);
|
||||
|
||||
u64 start = read_cpu_timer();
|
||||
u64 fault_count_start = page_fault_count();
|
||||
|
||||
u64 bytes_read = read(fd, tester->params.buffer,
|
||||
tester->params.read_size * tester->params.read_count);
|
||||
|
||||
@ -156,11 +154,11 @@ void test_read(reptester *tester, alloc_type type) {
|
||||
}
|
||||
|
||||
void test_write(reptester *tester, alloc_type type) {
|
||||
handle_alloc(tester, type);
|
||||
|
||||
u64 start = read_cpu_timer();
|
||||
u64 fault_count_start = page_fault_count();
|
||||
|
||||
handle_alloc(tester, type);
|
||||
|
||||
u64 total_size = tester->params.read_size * tester->params.read_count;
|
||||
|
||||
for (u64 i = 0; i < total_size; ++i) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user