Skip to content

Commit

Permalink
Remove unuzed nz from struct cpg_csc
Browse files Browse the repository at this point in the history
This was unused and always set to -1.
  • Loading branch information
ghorn committed Nov 4, 2023
1 parent 7125087 commit ef74551
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions cvxpygen/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,7 @@ def write_mat_def(f, mat, name):
f.write(f'{mat["n"]}, ')
f.write(f'{name}_p, ')
f.write(f'{name}_i, ')
f.write(f'{name}_x, ')
f.write(f'{mat["nz"]}}};\n')
f.write(f'{name}_x}};\n')


def write_mat_prot(f, mat, name):
Expand Down Expand Up @@ -167,7 +166,6 @@ def csc_to_dict(m):
d['x'] = m.data
d['nzmax'] = m.nnz
(d['m'], d['n']) = m.shape
d['nz'] = -1

return d

Expand Down Expand Up @@ -624,7 +622,6 @@ def write_workspace_prot(f, configuration, variable_info, dual_variable_info, pa
f.write(' cpg_int *p;\n')
f.write(' cpg_int *i;\n')
f.write(' cpg_float *x;\n')
f.write(' cpg_int nz;\n')
f.write('} cpg_csc;\n\n')

if configuration.unroll:
Expand Down

0 comments on commit ef74551

Please sign in to comment.