cvxgrp / qcml

A Python parser for generating Python/C/Matlab solver interfaces
Other
42 stars 9 forks source link

QCML codegen function #35

Open echu opened 10 years ago

echu commented 10 years ago

should be consistent. with C it takes a "name" argument. with Python and Matlab, it doesn't. the "name" argument should be ignored or the differing behavior documented somewhere...

chinasaur commented 10 years ago

In general it might be nice if the user can specify names of codegen functions more, but since the different codegens do fairly different things (solvable Python code, compilable C code, functioning Matlab code), I'm not sure how to expose this.

echu commented 10 years ago

i think the issue is that i conflated the "codgen" with the "save to file" functionality. once we split the two up, codegen will only take "language" as an argument. a separate "save to file" function will take a name argument (or a mapping of functions to names). i think that's probably the right way to do it. your thoughts?

chinasaur commented 10 years ago

Sounds right, but in general it's nice for the names of the functions to match somehow the names of the files. Maybe codegen can be tweaked so that the function name is easier to modify?

echu commented 10 years ago

Yeah; that should be easy, actually.

I wonder if you can already do this... (in a weird, OO-Java-ish way)

p.prob2socp.name = 'blahblah'

On Sun, Sep 22, 2013 at 12:46 PM, Peter H. Li notifications@github.comwrote:

Sounds right, but in general it's nice for the names of the functions to match somehow the names of the files. Maybe codegen can be tweaked so that the function name is easier to modify?

— Reply to this email directly or view it on GitHubhttps://github.com/cvxgrp/qcml/issues/35#issuecomment-24889030 .