Skip to content

Commit 1c8ccb3

Browse files
committed
Fix code error in documents no functionality change.
1 parent 971dab5 commit 1c8ccb3

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

graph_docs/kernel_optimization.dox

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ void field_solve_example() {
2323
const size_t num_grid = 1000;
2424
auto grid_value = graph::variable<T> (num_grid, "g");
2525
auto particle_index = graph::variable<T> (num_grid, "i");
26-
auto gird_position = graph::variable<T> (num_grid, "gx");
26+
auto grid_position = graph::variable<T> (num_grid, "gx");
2727

2828
std::vector<T> buffer(1000, static_cast<T> (0.0));
2929
grid_value->set(buffer);
@@ -33,14 +33,14 @@ void field_solve_example() {
3333
buffer[index] = static_cast<T> (2*index)/static_cast<T> (999)
3434
- static_cast<T> (1);
3535
}
36-
gx->set(buffer);
36+
flow_control->set(buffer);
3737

3838
auto indexed_particle = graph::index_1D(particle_positions,
3939
particle_index,
4040
static_cast<T> (1),
4141
static_cast<T> (0));
4242
auto next_index = particle_index + static_cast<T> (1.0);
43-
auto arg = indexed_particle - gird_position;
43+
auto arg = indexed_particle - grid_position;
4444
auto next_grid_value = grid_value
4545
+ graph::exp(static_cast<T> (-1)*arg*arg/static_cast<T> (10));
4646

@@ -52,7 +52,7 @@ void field_solve_example() {
5252
static_cast<T> (1),
5353
static_cast<T> (0));
5454
next_index = next_index + static_cast<T> (1.0);
55-
arg = indexed_particle - gird_position;
55+
arg = indexed_particle - grid_position;
5656
next_grid_value = next_grid_value
5757
+ graph::exp(static_cast<T> (-1)*arg*arg/static_cast<T> (10));
5858
}
@@ -78,7 +78,7 @@ void field_solve_example() {
7878
graph::variable_cast(particle_positions),
7979
graph::variable_cast(indexed_particle),
8080
graph::variable_cast(grid_value),
81-
graph::variable_cast(gird_position)
81+
graph::variable_cast(grid_position)
8282
}, {}, {
8383
{next_index, graph::variable_cast(indexed_particle)},
8484
{next_grid_value, graph::variable_cast(grid_value)}

0 commit comments

Comments
 (0)