Skip to content

Commit

Permalink
Merge pull request #33 from ghorn/greg/remove_unused_nz
Browse files Browse the repository at this point in the history
Remove unuzed nz from struct cpg_csc
  • Loading branch information
maxschaller authored Nov 18, 2023
2 parents 7125087 + ef74551 commit 9181c06
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 9181c06

Please sign in to comment.