Skip to content

Commit

Permalink
Adding SPDX-License-Identifier: Apache-2.0 to all .m, .c, .cpp, .h fi…
Browse files Browse the repository at this point in the history
…les that do not contain the word "License" in them.
  • Loading branch information
AmitSolomonPrinceton committed Apr 4, 2024
1 parent 6b9d2d0 commit f354a10
Show file tree
Hide file tree
Showing 46 changed files with 92 additions and 0 deletions.
2 changes: 2 additions & 0 deletions @osqp/build.m
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
% SPDX-License-Identifier: Apache-2.0

function build(varargin)
% Matlab MEX makefile for OSQP.
%
Expand Down
2 changes: 2 additions & 0 deletions @osqp/codegen.m
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
% SPDX-License-Identifier: Apache-2.0

%%
function codegen(this, out, varargin)
% CODEGEN generate C code for the parametric problem
Expand Down
2 changes: 2 additions & 0 deletions @osqp/osqp.m
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
% SPDX-License-Identifier: Apache-2.0

classdef osqp < handle
% osqp interface class for OSQP solver
% This class provides a complete interface to the C implementation
Expand Down
2 changes: 2 additions & 0 deletions @osqp/private/linsys_solver_to_string.m
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
% SPDX-License-Identifier: Apache-2.0

% Convert linear systme solver integer to string
function [linsys_solver_string] = linsys_solver_to_string(linsys_solver)
switch linsys_solver
Expand Down
2 changes: 2 additions & 0 deletions @osqp/private/string_to_linsys_solver.m
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
% SPDX-License-Identifier: Apache-2.0

function [linsys_solver] = string_to_linsys_solver(linsys_solver_string)
linsys_solver_string = lower(linsys_solver_string);
switch linsys_solver_string
Expand Down
2 changes: 2 additions & 0 deletions @osqp/setup.m
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
% SPDX-License-Identifier: Apache-2.0

%%
function varargout = setup(this, varargin)
% SETUP configure solver with problem data
Expand Down
2 changes: 2 additions & 0 deletions @osqp/solve.m
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
% SPDX-License-Identifier: Apache-2.0

%%
function varargout = solve(this, varargin)
% SOLVE solve the QP
Expand Down
2 changes: 2 additions & 0 deletions @osqp/update.m
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
% SPDX-License-Identifier: Apache-2.0

%%
function update(this,varargin)
% UPDATE modify the linear cost term and/or lower and upper bounds
Expand Down
2 changes: 2 additions & 0 deletions @osqp/update_codegen_defines.m
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
% SPDX-License-Identifier: Apache-2.0

function update_codegen_defines(this, varargin)
% UPDATE_CODEGEN_DEFINES update the current codegen defines

Expand Down
2 changes: 2 additions & 0 deletions @osqp/update_settings.m
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
% SPDX-License-Identifier: Apache-2.0

function update_settings(this, varargin)
% UPDATE_SETTINGS update the current solver settings structure

Expand Down
2 changes: 2 additions & 0 deletions @osqp/validate_settings.m
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
% SPDX-License-Identifier: Apache-2.0

function currentSettings = validate_settings(this, isInitialization, varargin)
% Don't allow these fields to be changed
unmodifiableFields = {'scaling', 'linsys_solver'};
Expand Down
2 changes: 2 additions & 0 deletions @osqp/warm_start.m
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
% SPDX-License-Identifier: Apache-2.0

function warm_start(this, varargin)
% WARM_START warm start primal and/or dual variables
%
Expand Down
2 changes: 2 additions & 0 deletions c_sources/arrays_matlab.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: Apache-2.0

#ifndef ARRAYS_MATLAB_H_
#define ARRAYS_MATLAB_H_

Expand Down
2 changes: 2 additions & 0 deletions c_sources/interrupt_matlab.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: Apache-2.0

/*
* Implements interrupt handling using ctrl-c for MATLAB mex files.
*/
Expand Down
2 changes: 2 additions & 0 deletions c_sources/memory_matlab.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: Apache-2.0

#include <mex.h>

void* c_calloc(size_t num, size_t size) {
Expand Down
2 changes: 2 additions & 0 deletions c_sources/memory_matlab.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: Apache-2.0

/* Memory managment for MATLAB */
#include "mex.h"

Expand Down
2 changes: 2 additions & 0 deletions c_sources/osqp_mex.cpp
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: Apache-2.0

#include <map>
#include <string>

Expand Down
2 changes: 2 additions & 0 deletions c_sources/osqp_struct.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: Apache-2.0

#ifndef OSQP_STRUCT_H_
#define OSQP_STRUCT_H_

Expand Down
2 changes: 2 additions & 0 deletions c_sources/osqp_struct_codegen_defines.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: Apache-2.0

#include <osqp.h>
#include "osqp_struct.h"

Expand Down
2 changes: 2 additions & 0 deletions c_sources/osqp_struct_info.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: Apache-2.0

#include <osqp.h>
#include "osqp_struct.h"

Expand Down
2 changes: 2 additions & 0 deletions c_sources/osqp_struct_settings.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: Apache-2.0

#include <osqp.h>
#include "osqp_struct.h"

Expand Down
2 changes: 2 additions & 0 deletions codegen/files_to_generate/emosqp_mex.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: Apache-2.0

#include <string.h>
#include <mex.h>
#include "osqp.h"
Expand Down
2 changes: 2 additions & 0 deletions codegen/files_to_generate/example.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: Apache-2.0

#include "stdio.h"
#include <string.h>

Expand Down
2 changes: 2 additions & 0 deletions codegen/make_emosqp.m
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
% SPDX-License-Identifier: Apache-2.0

function make_emosqp(target_dir, mex_cfile, EMBEDDED_FLAG, FLOAT_FLAG, LONG_FLAG)
% Matlab MEX makefile for code generated solver.

Expand Down
2 changes: 2 additions & 0 deletions codegen/render_workspace.m
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
% SPDX-License-Identifier: Apache-2.0

function render_workspace( work, hfname, cfname, embedded_flag )
%RENDER_WORKSPACE Write workspace to header file.

Expand Down
2 changes: 2 additions & 0 deletions examples/codegen_test.m
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
% SPDX-License-Identifier: Apache-2.0

%% Simple problem
m = 50;
n = 100;
Expand Down
2 changes: 2 additions & 0 deletions examples/easy_lasso_qp.m
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
% SPDX-License-Identifier: Apache-2.0

%% Lasso problem

% Problem dimensions and sparity
Expand Down
2 changes: 2 additions & 0 deletions examples/examples_old.m
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
% SPDX-License-Identifier: Apache-2.0

%% OSQPtest


Expand Down
2 changes: 2 additions & 0 deletions examples/examples_osqpmatlab.m
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
% SPDX-License-Identifier: Apache-2.0

%% Simple problem
m = 50;
n = 100;
Expand Down
2 changes: 2 additions & 0 deletions examples/interrupt.m
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
% SPDX-License-Identifier: Apache-2.0

%% Big lasso problem

% Problem dimensions and sparity
Expand Down
2 changes: 2 additions & 0 deletions examples/osqp_demo.m
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
% SPDX-License-Identifier: Apache-2.0

% Demo showing the usage of OSQP from Matlab and the code generation features.
% This problem is the same one that is presented in the osqp_demo.c file.

Expand Down
2 changes: 2 additions & 0 deletions examples/osqpmatlab.m
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
% SPDX-License-Identifier: Apache-2.0

function [x, y, cost, status, iter] = osqpmatlab(problem, warm_start, settings) %#codegen
% OSQPMATLAB Pure Matlab implementation of the OSQP solver
%
Expand Down
2 changes: 2 additions & 0 deletions package/install_osqp.m
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
% SPDX-License-Identifier: Apache-2.0

function install_osqp
% Install the OSQP solver Matlab interface

Expand Down
2 changes: 2 additions & 0 deletions package/package_osqp.m
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
% SPDX-License-Identifier: Apache-2.0

function package_osqp(version)
% Create OSQP matlab interface package

Expand Down
2 changes: 2 additions & 0 deletions run_osqp_tests.m
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
% SPDX-License-Identifier: Apache-2.0

import matlab.unittest.TestSuite;

[osqp_classpath,~,~] = fileparts( mfilename( 'fullpath' ) );
Expand Down
2 changes: 2 additions & 0 deletions unittests/basic_tests.m
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
% SPDX-License-Identifier: Apache-2.0

classdef basic_tests < matlab.unittest.TestCase
%TEST_BASIC_QP Solve Basic QP Problem

Expand Down
2 changes: 2 additions & 0 deletions unittests/codegen_mat_tests.m
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
% SPDX-License-Identifier: Apache-2.0

classdef codegen_mat_tests < matlab.unittest.TestCase
%TEST_BASIC_QP Solve Basic QP Problem

Expand Down
2 changes: 2 additions & 0 deletions unittests/codegen_vec_tests.m
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
% SPDX-License-Identifier: Apache-2.0

classdef codegen_vec_tests < matlab.unittest.TestCase
%TEST_BASIC_QP Solve Basic QP Problem

Expand Down
2 changes: 2 additions & 0 deletions unittests/dual_infeasibility_tests.m
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
% SPDX-License-Identifier: Apache-2.0

classdef dual_infeasibility_tests < matlab.unittest.TestCase

properties
Expand Down
2 changes: 2 additions & 0 deletions unittests/feasibility_tests.m
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
% SPDX-License-Identifier: Apache-2.0

classdef feasibility_tests < matlab.unittest.TestCase
%FEASIBILITY_TESTS Solve equality constrained feasibility problem

Expand Down
2 changes: 2 additions & 0 deletions unittests/non_cvx_tests.m
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
% SPDX-License-Identifier: Apache-2.0

classdef non_cvx_tests < matlab.unittest.TestCase
%NON_CVX_TESTS Try to solve a non-convex QP

Expand Down
2 changes: 2 additions & 0 deletions unittests/primal_infeasibility_tests.m
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
% SPDX-License-Identifier: Apache-2.0

classdef primal_infeasibility_tests < matlab.unittest.TestCase

properties
Expand Down
2 changes: 2 additions & 0 deletions unittests/unconstrained_tests.m
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
% SPDX-License-Identifier: Apache-2.0

classdef unconstrained_tests < matlab.unittest.TestCase
%UNCONSTRAINED_TESTS Solve unconstrained quadratic program

Expand Down
2 changes: 2 additions & 0 deletions unittests/update_matrices_tests.m
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
% SPDX-License-Identifier: Apache-2.0

classdef update_matrices_tests < matlab.unittest.TestCase
%TEST_BASIC_QP Solve Basic QP Problem

Expand Down
2 changes: 2 additions & 0 deletions unittests/warm_start_tests.m
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
% SPDX-License-Identifier: Apache-2.0

classdef warm_start_tests < matlab.unittest.TestCase
%WARM_START_TESTS Warm Start problems solution

Expand Down
2 changes: 2 additions & 0 deletions utils/convertProblemToMat.m
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
% SPDX-License-Identifier: Apache-2.0

function convertProblemToMat(filename, Pdata, qdata, Adata, ldata, udata)
Ptrip = load(Pdata);
P = spconvert(Ptrip);
Expand Down

0 comments on commit f354a10

Please sign in to comment.