Skip to content

Commit

Permalink
Merge pull request #37 from cvxgrp/ms/cpg_csc
Browse files Browse the repository at this point in the history
Remove nzmax, m, n from cpg_csc
  • Loading branch information
maxschaller authored Nov 18, 2023
2 parents 9181c06 + 6aca831 commit 08bde24
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions cvxpygen/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,6 @@ def write_mat_def(f, mat, name):
write_vec_def(f, mat['x'], name + '_x', 'cpg_float')

f.write(f'cpg_csc {name} = {{')
f.write(f'{mat["nzmax"]}, ')
f.write(f'{mat["m"]}, ')
f.write(f'{mat["n"]}, ')
f.write(f'{name}_p, ')
f.write(f'{name}_i, ')
f.write(f'{name}_x}};\n')
Expand Down Expand Up @@ -164,8 +161,6 @@ def csc_to_dict(m):
d['i'] = m.indices
d['p'] = m.indptr
d['x'] = m.data
d['nzmax'] = m.nnz
(d['m'], d['n']) = m.shape

return d

Expand Down Expand Up @@ -616,9 +611,6 @@ def write_workspace_prot(f, configuration, variable_info, dual_variable_info, pa
# struct definitions
f.write('// Compressed sparse column matrix\n')
f.write('typedef struct {\n')
f.write(' cpg_int nzmax;\n')
f.write(' cpg_int n;\n')
f.write(' cpg_int m;\n')
f.write(' cpg_int *p;\n')
f.write(' cpg_int *i;\n')
f.write(' cpg_float *x;\n')
Expand Down

0 comments on commit 08bde24

Please sign in to comment.