Skip to content

Commit

Permalink
update deps and pyo3 signatures (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
jcmgray committed Aug 13, 2024
1 parent fb3491d commit 2627ac9
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 147 deletions.
171 changes: 27 additions & 144 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ name = "cotengrust"
crate-type = ["cdylib"]

[dependencies]
bit-set = "0.5"
bit-set = "0.8"
ordered-float = "4.2"
pyo3 = "0.21"
pyo3 = "0.22"
rand = "0.8"
rustc-hash = "1.1"
rustc-hash = "2.0"

[profile.release]
codegen-units = 1
Expand Down
5 changes: 5 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -865,6 +865,7 @@ impl ContractionProcessor {
// --------------------------- PYTHON FUNCTIONS ---------------------------- //

#[pyfunction]
#[pyo3(signature = (ssa_path, n=None))]
fn ssa_to_linear(ssa_path: SSAPath, n: Option<usize>) -> SSAPath {
let n = match n {
Some(n) => n,
Expand Down Expand Up @@ -902,6 +903,7 @@ fn find_subgraphs(
}

#[pyfunction]
#[pyo3(signature = (inputs, output, size_dict, use_ssa=None))]
fn optimize_simplify(
inputs: Vec<Vec<char>>,
output: Vec<char>,
Expand All @@ -919,6 +921,7 @@ fn optimize_simplify(
}

#[pyfunction]
#[pyo3(signature = (inputs, output, size_dict, costmod=None, temperature=None, seed=None, simplify=None, use_ssa=None))]
fn optimize_greedy(
py: Python,
inputs: Vec<Vec<char>>,
Expand Down Expand Up @@ -950,6 +953,7 @@ fn optimize_greedy(
}

#[pyfunction]
#[pyo3(signature = (inputs, output, size_dict, ntrials, costmod=None, temperature=None, seed=None, simplify=None, use_ssa=None))]
fn optimize_random_greedy_track_flops(
py: Python,
inputs: Vec<Vec<char>>,
Expand Down Expand Up @@ -1035,6 +1039,7 @@ fn optimize_random_greedy_track_flops(
}

#[pyfunction]
#[pyo3(signature = (inputs, output, size_dict, minimize=None, cost_cap=None, search_outer=None, simplify=None, use_ssa=None))]
fn optimize_optimal(
py: Python,
inputs: Vec<Vec<char>>,
Expand Down

0 comments on commit 2627ac9

Please sign in to comment.