File tree 5 files changed +10
-14
lines changed
5 files changed +10
-14
lines changed Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ price_model_scratch_footprint( uint64_t cnt ) { /* Assumes price_model_cnt_valid
47
47
large ... typically a multiple of 3 but this is not required,
48
48
quote[i] for i in [0,cnt) are the quotes of interest on input, p25,
49
49
p50, p75 point to where to write model outputs, scratch points to a
50
- suitable footprint srcatch region).
50
+ suitable footprint scratch region).
51
51
52
52
Returns a pointer to the quotes sorted in ascending order. As such,
53
53
the min and max and any other rank statistic can be extracted easily
@@ -68,7 +68,7 @@ price_model_scratch_footprint( uint64_t cnt ) { /* Assumes price_model_cnt_valid
68
68
worst cases. This function uses no heap / dynamic memory allocation.
69
69
It is thread safe provided it passed non-conflicting quote, output
70
70
and scratch arrays. It has a bounded call depth ~lg cnt <= ~64 (this
71
- could reducd to O(1) by using a non-recursive sort/select
71
+ could reduce to O(1) by using a non-recursive sort/select
72
72
implementation under the hood if desired). */
73
73
74
74
int64_t * /* Returns pointer to sorted quotes (either quote or ALIGN_UP(scratch,int64_t)) */
Original file line number Diff line number Diff line change @@ -161,7 +161,7 @@ SORT_IMPL(stable_node)( SORT_KEY_T * x,
161
161
SORT_IDX_T k = (SORT_IDX_T )0 ;
162
162
163
163
/* Note that nl and nr are both at least one at this point so at least
164
- one interation of the loop body is necessary. */
164
+ one iteration of the loop body is necessary. */
165
165
166
166
for (;;) { /* Minimal C language operations */
167
167
if ( SORT_BEFORE ( yr [k ], yl [j ] ) ) {
Original file line number Diff line number Diff line change 3
3
4
4
/* Portable robust integer averaging. (No intermediate overflow, no
5
5
assumptions about platform type wides, no assumptions about integer
6
- signed right shift, no signed integer division, no implict
6
+ signed right shift, no signed integer division, no implicit
7
7
conversions, etc.) */
8
8
9
9
#include "sar.h"
Original file line number Diff line number Diff line change 15
15
#include "hash.h" /* includes stdint.h */
16
16
17
17
/* prng_t should be treated as an opaque handle of a pseudo random
18
- number generator. (It technically isn't here to faciliate inlining
18
+ number generator. (It technically isn't here to facilitate inlining
19
19
of prng operations.) */
20
20
21
21
struct prng {
@@ -65,7 +65,7 @@ prng_private_contract( uint64_t seq ) {
65
65
66
66
prng_new takes ownership of the memory region pointed to by mem
67
67
(which is assumed to be non-NULL with the appropriate footprint and
68
- alingment ) and formats it as a prng. The pseudo random number
68
+ alignment ) and formats it as a prng. The pseudo random number
69
69
generator stream will initialized to use sequence random sequence
70
70
"seq" and will start at index "idx". Returns mem (which will be
71
71
formatted for use). The caller will not be joined to the region on
Original file line number Diff line number Diff line change @@ -23,19 +23,15 @@ use {
23
23
solana_program:: entrypoint,
24
24
} ;
25
25
26
- // Below is a high lever description of the rust/c setup.
26
+ // Below is a high level description of the rust/c setup.
27
27
28
- // As we migrate from C to Rust, our Rust code needs to be able to interact with C
28
+ // As we migrate from C to Rust, our Rust code needs to be able to interact with C.
29
29
// build-bpf.sh is set up to compile the C code into a two archive files
30
30
// contained in `./program/c/target/`
31
31
// - `libcpyth-bpf.a` contains the bpf version for production code
32
32
// - `libcpyth-native.a` contains the systems architecture version for tests
33
33
34
- // We also generate bindings for the types and constants in oracle.h (as well as other things
35
- // included in bindings.h), these bindings can be accessed through c_oracle_header.rs
36
- // Bindings allow us to access type definitions, function definitions and constants. In order to
37
- // add traits to the bindings, we use the parser in build.rs. The traits must be defined/included
38
- // at the the top of c_oracle_headers.rs. One of the most important traits we deal are the Borsh
39
- // serialization traits.
34
+ // We also generate bindings for the constants in oracle.h (as well as other things
35
+ // included in bindings.h).
40
36
41
37
entrypoint ! ( process_instruction) ;
You can’t perform that action at this time.
0 commit comments