Skip to content

Commit e72f602

Browse files
committed
Update to add SPDX
1 parent 122cce8 commit e72f602

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+212
-18
lines changed

.clang-format

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# SPDX-License-Identifier: BSD-3-Clause
2+
13
---
24
BasedOnStyle: LLVM
35
PointerAlignment: Left

.github/workflows/ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# SPDX-License-Identifier: BSD-3-Clause
2+
13
name: "CI"
24

35
on:

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# SPDX-License-Identifier: BSD-3-Clause
2+
3+
scripts
4+
venv
5+
build
6+
._*

.pre-commit-config.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# SPDX-License-Identifier: BSD-3-Clause
2+
13
repos:
24

35
- repo: https://github.com/pre-commit/mirrors-clang-format
@@ -12,3 +14,8 @@ repos:
1214
- id: end-of-file-fixer
1315
- id: mixed-line-ending
1416
- id: check-added-large-files
17+
18+
- repo: https://github.com/fsfe/reuse-tool
19+
rev: v2.1.0
20+
hooks:
21+
- id: reuse

CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# SPDX-License-Identifier: BSD-3-Clause
2+
13
cmake_minimum_required(VERSION 3.5)
24
project(binsparse-rc)
35

File renamed without changes.

README.md

Lines changed: 4 additions & 0 deletions

examples/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# SPDX-License-Identifier: BSD-3-Clause
2+
13
function(add_example example_name)
24
add_executable(${example_name} ${example_name}.c)
35
target_link_libraries(${example_name} binsparse-rc)
@@ -10,6 +12,7 @@ add_example(simple_write)
1012
add_example(mtx2bsp)
1113
add_example(bsp2mtx)
1214
add_example(check_equivalence)
15+
add_example(check_equivalence_parallel)
1316
add_example(bsp-ls)
1417
add_example(benchmark_read)
1518
add_example(benchmark_read_parallel)

examples/benchmark_read.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
/*
2+
* SPDX-License-Identifier: BSD-3-Clause
3+
*/
4+
15
#include <binsparse/binsparse.h>
26
#include <stdlib.h>
37
#include <time.h>

examples/benchmark_read_parallel.c

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
/*
2+
* SPDX-License-Identifier: BSD-3-Clause
3+
*/
4+
15
#include <binsparse/binsparse.h>
26
#include <stdlib.h>
37
#include <time.h>
@@ -61,8 +65,9 @@ int main(int argc, char** argv) {
6165
char* file_name = argv[1];
6266

6367
printf("Opening %s\n", file_name);
68+
fflush(stdout);
6469

65-
const int num_trials = 2;
70+
const int num_trials = 10;
6671

6772
int num_threads = 6;
6873

@@ -71,11 +76,10 @@ int main(int argc, char** argv) {
7176
size_t nbytes = 0;
7277

7378
// To flush the filesystem cache before each trial, change to `true`.
74-
bool cold_cache = true;
79+
bool cold_cache = false;
7580

7681
// If running warm cache experiments, read once to warm cache.
77-
if (!cold_cache && false) {
78-
printf("Warm cache read...\n");
82+
if (!cold_cache) {
7983
bsp_matrix_t mat = bsp_read_matrix_parallel(file_name, NULL, num_threads);
8084
bsp_destroy_matrix_t(mat);
8185
}
@@ -84,6 +88,7 @@ int main(int argc, char** argv) {
8488
if (cold_cache) {
8589
flush_cache();
8690
}
91+
fflush(stdout);
8792
double begin = gettime();
8893
bsp_matrix_t mat = bsp_read_matrix_parallel(file_name, NULL, num_threads);
8994
double end = gettime();
@@ -95,6 +100,7 @@ int main(int argc, char** argv) {
95100
double gbytes = ((double) nbytes) / 1024 / 1024 / 1024;
96101
double gbytes_s = gbytes / durations[i];
97102
printf("FORPARSER: %s,%lf,%lf\n", file_name, durations[i], gbytes_s);
103+
fflush(stdout);
98104
}
99105

100106
printf("[");

0 commit comments

Comments
 (0)