Skip to content

Commit 165a9bc

Browse files
authored
Solve some typos (#322)
* Solve some typos * Fix comment * Fix lib comments:
1 parent fd32f3c commit 165a9bc

File tree

5 files changed

+10
-14
lines changed

5 files changed

+10
-14
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ price_model_scratch_footprint( uint64_t cnt ) { /* Assumes price_model_cnt_valid
4747
large ... typically a multiple of 3 but this is not required,
4848
quote[i] for i in [0,cnt) are the quotes of interest on input, p25,
4949
p50, p75 point to where to write model outputs, scratch points to a
50-
suitable footprint srcatch region).
50+
suitable footprint scratch region).
5151
5252
Returns a pointer to the quotes sorted in ascending order. As such,
5353
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
6868
worst cases. This function uses no heap / dynamic memory allocation.
6969
It is thread safe provided it passed non-conflicting quote, output
7070
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
7272
implementation under the hood if desired). */
7373

7474
int64_t * /* Returns pointer to sorted quotes (either quote or ALIGN_UP(scratch,int64_t)) */

program/c/src/oracle/sort/tmpl/sort_stable.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ SORT_IMPL(stable_node)( SORT_KEY_T * x,
161161
SORT_IDX_T k = (SORT_IDX_T)0;
162162

163163
/* 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. */
165165

166166
for(;;) { /* Minimal C language operations */
167167
if( SORT_BEFORE( yr[k], yl[j] ) ) {

program/c/src/oracle/util/avg.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
/* Portable robust integer averaging. (No intermediate overflow, no
55
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
77
conversions, etc.) */
88

99
#include "sar.h"

program/c/src/oracle/util/prng.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#include "hash.h" /* includes stdint.h */
1616

1717
/* 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
1919
of prng operations.) */
2020

2121
struct prng {
@@ -65,7 +65,7 @@ prng_private_contract( uint64_t seq ) {
6565
6666
prng_new takes ownership of the memory region pointed to by mem
6767
(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
6969
generator stream will initialized to use sequence random sequence
7070
"seq" and will start at index "idx". Returns mem (which will be
7171
formatted for use). The caller will not be joined to the region on

program/rust/src/lib.rs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,15 @@ use {
2323
solana_program::entrypoint,
2424
};
2525

26-
// Below is a high lever description of the rust/c setup.
26+
// Below is a high level description of the rust/c setup.
2727

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.
2929
// build-bpf.sh is set up to compile the C code into a two archive files
3030
// contained in `./program/c/target/`
3131
// - `libcpyth-bpf.a` contains the bpf version for production code
3232
// - `libcpyth-native.a` contains the systems architecture version for tests
3333

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).
4036

4137
entrypoint!(process_instruction);

0 commit comments

Comments
 (0)