cvxgrp/qcml

QCML codegen function

Opened this issue · 4 comments

echu commented

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

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

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?

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

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//issues/35#issuecomment-24889030
.