Skip to content

Commit 6293217

Browse files
committed
ran formatter
1 parent 5adbaac commit 6293217

8 files changed

Lines changed: 15 additions & 14 deletions

File tree

include/utils/Timer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ typedef struct
2222
(time_variable) += GET_ELAPSED_SECONDS(timer); \
2323
} while (0)
2424

25-
#endif // TIMER_H
25+
#endif // TIMER_H

python/atoms/left_matmul.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#ifndef ATOM_LEFT_MATMUL_H
22
#define ATOM_LEFT_MATMUL_H
33

4-
#include "common.h"
54
#include "bivariate.h"
5+
#include "common.h"
66

77
/* Left matrix multiplication: A @ f(x) where A is a constant matrix */
88
static PyObject *py_make_left_matmul(PyObject *self, PyObject *args)

python/atoms/linear.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ static PyObject *py_make_linear(PyObject *self, PyObject *args)
77
{
88
PyObject *child_capsule;
99
PyObject *data_obj, *indices_obj, *indptr_obj;
10-
PyObject *b_obj = Py_None; /* Optional offset vector */
10+
PyObject *b_obj = Py_None; /* Optional offset vector */
1111
int m, n;
1212

1313
/* Accept optional b array: (child, data, indices, indptr, m, n[, b]) */
@@ -55,7 +55,8 @@ static PyObject *py_make_linear(PyObject *self, PyObject *args)
5555

5656
if (b_obj != Py_None)
5757
{
58-
b_array = (PyArrayObject *) PyArray_FROM_OTF(b_obj, NPY_DOUBLE, NPY_ARRAY_IN_ARRAY);
58+
b_array = (PyArrayObject *) PyArray_FROM_OTF(b_obj, NPY_DOUBLE,
59+
NPY_ARRAY_IN_ARRAY);
5960
if (!b_array)
6061
{
6162
free_csr_matrix(A);

python/atoms/multiply.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#ifndef ATOM_MULTIPLY_H
22
#define ATOM_MULTIPLY_H
33

4-
#include "common.h"
54
#include "bivariate.h"
5+
#include "common.h"
66

77
static PyObject *py_make_multiply(PyObject *self, PyObject *args)
88
{

python/atoms/quad_over_lin.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@
99
/* quad_over_lin: y = sum(x^2) / z where x is left, z is right (scalar) */
1010
static PyObject *py_make_quad_over_lin(PyObject *self, PyObject *args)
1111
{
12-
(void)self;
12+
(void) self;
1313
PyObject *left_capsule, *right_capsule;
1414
if (!PyArg_ParseTuple(args, "OO", &left_capsule, &right_capsule))
1515
{
1616
return NULL;
1717
}
18-
expr *left = (expr *)PyCapsule_GetPointer(left_capsule, EXPR_CAPSULE_NAME);
19-
expr *right = (expr *)PyCapsule_GetPointer(right_capsule, EXPR_CAPSULE_NAME);
18+
expr *left = (expr *) PyCapsule_GetPointer(left_capsule, EXPR_CAPSULE_NAME);
19+
expr *right = (expr *) PyCapsule_GetPointer(right_capsule, EXPR_CAPSULE_NAME);
2020
if (!left || !right)
2121
{
2222
PyErr_SetString(PyExc_ValueError, "invalid child capsule");

python/atoms/rel_entr.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@
99
/* rel_entr: rel_entr(x, y) = x * log(x/y) elementwise */
1010
static PyObject *py_make_rel_entr(PyObject *self, PyObject *args)
1111
{
12-
(void)self;
12+
(void) self;
1313
PyObject *left_capsule, *right_capsule;
1414
if (!PyArg_ParseTuple(args, "OO", &left_capsule, &right_capsule))
1515
{
1616
return NULL;
1717
}
18-
expr *left = (expr *)PyCapsule_GetPointer(left_capsule, EXPR_CAPSULE_NAME);
19-
expr *right = (expr *)PyCapsule_GetPointer(right_capsule, EXPR_CAPSULE_NAME);
18+
expr *left = (expr *) PyCapsule_GetPointer(left_capsule, EXPR_CAPSULE_NAME);
19+
expr *right = (expr *) PyCapsule_GetPointer(right_capsule, EXPR_CAPSULE_NAME);
2020
if (!left || !right)
2121
{
2222
PyErr_SetString(PyExc_ValueError, "invalid child capsule");

python/atoms/right_matmul.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#ifndef ATOM_RIGHT_MATMUL_H
22
#define ATOM_RIGHT_MATMUL_H
33

4-
#include "common.h"
54
#include "bivariate.h"
5+
#include "common.h"
66

77
/* Right matrix multiplication: f(x) @ A where A is a constant matrix */
88
static PyObject *py_make_right_matmul(PyObject *self, PyObject *args)

python/bindings.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,8 @@ static PyMethodDef DNLPMethods[] = {
146146
"Get Lagrangian Hessian without recomputing"},
147147
{NULL, NULL, 0, NULL}};
148148

149-
static struct PyModuleDef dnlp_module = {
150-
PyModuleDef_HEAD_INIT, "_diffengine", NULL, -1, DNLPMethods};
149+
static struct PyModuleDef dnlp_module = {PyModuleDef_HEAD_INIT, "_diffengine", NULL,
150+
-1, DNLPMethods};
151151

152152
PyMODINIT_FUNC PyInit__diffengine(void)
153153
{

0 commit comments

Comments
 (0)