qcml icon indicating copy to clipboard operation
qcml copied to clipboard

QCML codegen function

Open echu opened this issue 12 years ago • 4 comments

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...

echu avatar Sep 22 '13 00:09 echu

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.

chinasaur avatar Sep 22 '13 17:09 chinasaur

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?

echu avatar Sep 22 '13 19:09 echu

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?

chinasaur avatar Sep 22 '13 19:09 chinasaur

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 [email protected]:

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 .

echu avatar Sep 22 '13 19:09 echu