MCPcopy Create free account
hub / github.com/YuminosukeSato/ironkernel / go_with_reduce_spec

Function go_with_reduce_spec

src/python/py_runtime.rs:498–517  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

496
497 #[test]
498 fn go_with_reduce_spec() {
499 pyo3::prepare_freethreaded_python();
500 Python::with_gil(|py| {
501 use crate::ir::kernel::ReduceOp;
502 use crate::python::py_kernel::PyReduceSpec;
503
504 let reduce_spec = PyReduceSpec {
505 op: ReduceOp::Sum,
506 buffer: crate::buffer::inner::Buffer::from_f64_vec(vec![1.0, 2.0, 3.0]),
507 };
508 let py_reduce = reduce_spec.into_pyobject(py).unwrap();
509
510 let runtime = PyRuntimeModule::new();
511 let call_args = empty_args(py);
512 let task = runtime
513 .go(py, py_reduce.as_any(), &call_args, None, None)
514 .unwrap();
515 assert!(task.inner.is_done());
516 });
517 }
518
519 #[test]
520 fn chan_creates_channel() {

Callers

nothing calls this directly

Calls 2

empty_argsFunction · 0.85
goMethod · 0.45

Tested by

no test coverage detected