Skip to content

Commit ce828cf

Browse files
author
Jason Ramapuram
committed
fix examples for batching API
1 parent df0874e commit ce828cf

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

examples/helloworld.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ fn main() {
1818

1919
println!("Element-wise arithmetic");
2020
let b = sin(&a)
21-
.and_then(|x| add(&x, &1.5))
21+
.and_then(|x| add(&x, &1.5, false))
2222
.unwrap();
2323

2424
let b2 = sin(&a).
2525
and_then(|x| {
2626
cos(&a)
27-
.and_then(|y| add(&x, &y))
27+
.and_then(|y| add(&x, &y, false))
2828
})
2929
.unwrap();
3030

examples/histogram.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ fn main() {
3333

3434
let disp_img = man.dims()
3535
.and_then(|x| constant(255 as f32, x))
36-
.and_then(|x| div(&man, &x))
36+
.and_then(|x| div(&man, &x, false))
3737
.unwrap();
3838

3939
loop {

examples/pi.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ fn main() {
1818
let start = PreciseTime::now();
1919

2020
for bench_iter in 0..100 {
21-
let pi_val = add(&mul(x, x).unwrap(), &mul(y, y).unwrap())
21+
let pi_val = add(&mul(x, x, false).unwrap(), &mul(y, y, false).unwrap(), false)
2222
.and_then( |z| sqrt(&z) )
23-
.and_then( |z| le(&z, &constant(1, dims).unwrap()) )
23+
.and_then( |z| le(&z, &constant(1, dims).unwrap(), false) )
2424
.and_then( |z| sum_all(&z) )
2525
.map( |z| z.0 * 4.0/(samples as f64) )
2626
.unwrap();

0 commit comments

Comments
 (0)