Skip to content

Added kgen #12

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
name = "SourceCodeMcCormick"
uuid = "a7283dc5-4ecf-47fb-a95b-1412723fc960"
authors = ["Robert Gottlieb <[email protected]>"]
version = "0.4.1"
version = "0.5.0"

[deps]
CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba"
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
DocStringExtensions = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae"
Graphs = "86223c79-3864-5bf0-83f7-82e725a168b6"
IfElse = "615f187c-cbe4-4ef1-ba3b-2fcf58d6d173"
PrecompileTools = "aea7be01-6a6a-4083-8856-8a6e6704d82a"
Reexport = "189a3867-3050-52da-a836-e630ba90ab69"
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
SymbolicUtils = "d1185830-fcd6-423d-90d6-eec64667417b"
Symbolics = "0c5d862f-8b57-4792-8d23-62f2024744c7"

Expand Down
12 changes: 11 additions & 1 deletion src/SourceCodeMcCormick.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ using IfElse
using DocStringExtensions
using Graphs
using CUDA
using StaticArrays: @MVector
import Dates
import SymbolicUtils: BasicSymbolic, exprtype, SYM, TERM, ADD, MUL, POW, DIV

Expand Down Expand Up @@ -46,12 +47,21 @@ include(joinpath(@__DIR__, "interval", "interval.jl"))
include(joinpath(@__DIR__, "relaxation", "relaxation.jl"))
include(joinpath(@__DIR__, "transform", "transform.jl"))
include(joinpath(@__DIR__, "grad", "grad.jl"))
include(joinpath(@__DIR__, "kernel_writer", "kernel_write.jl"))
include(joinpath(@__DIR__, "precompile.jl"))
_precompile_()

export McCormickIntervalTransform, IntervalTransform

export apply_transform, all_evaluators, convex_evaluator, extract_terms,
genvar, genparam, get_name, factor, binarize!, pull_vars, shrink_eqs,
grad, shrink_grad!, convex_subgradient, all_subgradients, grad_transform!,
levels, eqn_edges, eval_generator, grad_eval_generator, fgen
levels, eqn_edges, eval_generator, grad_eval_generator, fgen, kgen,
perform_substitutions

# export individual kernels
export SCMC_cadd_kernel, SCMC_add_to_kernel, SCMC_negate_kernel, SCMC_exp_kernel,
SCMC_log_kernel, SCMC_inv_kernel, SCMC_cmul_kernel, SCMC_sigmoid_kernel,
SCMC_mult_kernel, SCMC_add_kernel

end
Loading