Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
BasedOnStyle: LLVM

IndentWidth: 4
TabWidth: 4
UseTab: Never

ColumnLimit: 120

BreakBeforeBraces: Allman

PointerAlignment: Right
DerivePointerAlignment: false

BinPackParameters: false
BinPackArguments: false

AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AllowShortFunctionsOnASingleLine: false

IndentCaseLabels: true
InsertNewlineAtEOF: true

SortIncludes: true

ReflowComments: false
AlignOperands: false

StatementMacros:
- ASSERT
- CHECK
- REQUIRE
- ENSURE
- EXPECT
- CUDA_CHECK
- CUBLAS_CHECK
- CUSPARSE_CHECK

AttributeMacros:
- __global__
- __device__
- __host__
- __shared__
- __constant__
- __managed__
- __launch_bounds__
21 changes: 21 additions & 0 deletions .github/workflows/check-clang-format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Format

on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:

jobs:
build:
name: Clang Format Check
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: DoozyX/clang-format-lint-action@v0.20
with:
source: '.'
extensions: 'h,c,cu'
clangFormatVersion: 20
24 changes: 24 additions & 0 deletions .github/workflows/spelling.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Spelling

permissions:
contents: read

on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:

env:
CLICOLOR: 1

jobs:
spelling:
name: Spell Check with Typos
runs-on: ubuntu-latest
steps:
- name: Checkout Actions Repository
uses: actions/checkout@v5
- name: Spell Check Repo
uses: crate-ci/typos@v1.42.3
21 changes: 9 additions & 12 deletions include/cupdlpx.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,22 +24,19 @@ extern "C"
#endif

// create an lp_problem_t from a matrix descriptor
lp_problem_t *create_lp_problem(
const double *objective_c,
const matrix_desc_t *A_desc,
const double *con_lb,
const double *con_ub,
const double *var_lb,
const double *var_ub,
const double *objective_constant);
lp_problem_t *create_lp_problem(const double *objective_c,
const matrix_desc_t *A_desc,
const double *con_lb,
const double *con_ub,
const double *var_lb,
const double *var_ub,
const double *objective_constant);

// Set up initial primal and dual solution for an lp_problem_t
void set_start_values(lp_problem_t *prob, const double *primal, const double *dual);

// solve the LP problem using PDHG
cupdlpx_result_t *solve_lp_problem(
lp_problem_t *prob,
const pdhg_parameters_t *params);
cupdlpx_result_t *solve_lp_problem(lp_problem_t *prob, const pdhg_parameters_t *params);

// parameter
void set_default_parameters(pdhg_parameters_t *params);
Expand All @@ -50,4 +47,4 @@ extern "C"

#ifdef __cplusplus
} // extern "C"
#endif
#endif
Loading
Loading