Skip to content

Commit bf9c968

Browse files
author
Guillermo Bescos
committed
CI
1 parent 966f672 commit bf9c968

29 files changed

+25
-48
lines changed

.pre-commit-config.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ repos:
33
rev: v3.2.0
44
hooks:
55
- id: trailing-whitespace
6+
files : program/
67
- id: end-of-file-fixer
8+
files : program/
79
- id: check-added-large-files
810
- repo: local
911
hooks:

program/c/src/oracle/model/clean

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
#!/bin/sh
22
rm -rfv bin
3-

program/c/src/oracle/model/price_model.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ price_model_core( uint64_t cnt,
1717
optimized mergesort (merge with an unrolled insertion sorting
1818
network small n base cases). The best case is ~0.5 n lg n compares
1919
and the average and worst cases are ~n lg n compares.
20-
20+
2121
While not completely data oblivious, this has quite low variance in
2222
operation count practically and this is _better_ than quicksort's
2323
average case and quicksort's worst case is a computational
2424
denial-of-service and timing attack vulnerable O(n^2). Unlike
2525
quicksort, this is also stable (but this stability does not
2626
currently matter ... it might be a factor in future models).
27-
27+
2828
A data oblivious sorting network approach might be viable here with
2929
and would have a completely deterministic operations count. It
3030
currently isn't used as the best known practical approaches for
@@ -101,7 +101,7 @@ price_model_core( uint64_t cnt,
101101

102102
*_p50 = avg_2_int64( vl, vr );
103103
}
104-
104+
105105
/* Extract the p75 (this is the mirror image of the p25 case) */
106106

107107
uint64_t p75_idx = cnt - ((uint64_t)1) - p25_idx;
@@ -110,4 +110,3 @@ price_model_core( uint64_t cnt,
110110

111111
return sort_quote;
112112
}
113-

program/c/src/oracle/model/run_tests

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,3 @@ $CC test_price_model.c price_model.c -o bin/test_price_model || exit 1
1515
bin/test_price_model || exit 1
1616

1717
echo all tests passed
18-

program/c/src/oracle/model/test_price_model.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,4 +66,3 @@ main( int argc,
6666
printf( "pass\n" );
6767
return 0;
6868
}
69-

program/c/src/oracle/oracle.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -563,4 +563,3 @@ extern uint64_t c_entrypoint(const uint8_t *input)
563563
}
564564
return dispatch( prm, ka );
565565
}
566-

program/c/src/oracle/oracle.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ extern "C" {
1313
// defines to u32 (even with ULL suffix)
1414
const uint64_t SUCCESSFULLY_UPDATED_AGGREGATE = 1000ULL;
1515

16-
// The size of the "time machine" account defined in the
16+
// The size of the "time machine" account defined in the
1717
// Rust portion of the codebase.
1818
const uint64_t TIME_MACHINE_STRUCT_SIZE = 1864ULL;
1919

program/c/src/oracle/pd.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,4 +188,3 @@ static inline void pd_sqrt( pd_t *r, pd_t *val, const int64_t *f )
188188
#ifdef __cplusplus
189189
}
190190
#endif
191-

program/c/src/oracle/sort/clean

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
#!/bin/sh
22
rm -rfv bin
3-

program/c/src/oracle/sort/run_tests

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,3 @@ $CC test_sort_stable.c -o bin/test_sort_stable || exit 1
1515
bin/test_sort_stable || exit 1
1616

1717
echo all tests passed
18-

0 commit comments

Comments
 (0)