COPP C ABI
C interface for COPP trajectory optimization
Loading...
Searching...
No Matches
CoppMatrixViewF64 Struct Reference

Borrowed immutable f64 matrix passed from C to COPP. More...

#include <core.h>

Data Fields

const double * data
 Pointer to the first matrix element.
size_t rows
 Number of matrix rows.
size_t cols
 Number of matrix columns.
enum CoppMatrixLayout layout
 Matrix memory layout.
size_t leading_dim
 Leading dimension / physical stride.

Detailed Description

Borrowed immutable f64 matrix passed from C to COPP.

The matrix has shape (rows, cols) and uses the indexing rule selected by layout. For contiguous column-major input, use leading_dim = rows. For contiguous row-major input, use leading_dim = cols.

Column-major input with leading_dim >= rows is the zero-copy path for matrix-view consumers. Strictly contiguous column-major input with leading_dim == rows is also accepted by APIs that require a raw contiguous slice. Row-major input is copied once into column-major temporary storage before COPP uses it.

The pointer must reference enough initialized double values for the selected layout unless rows == 0 or cols == 0, in which case data may be null. Borrowed matrix inputs must remain valid and must not be mutated concurrently for the duration of the call.

Field Documentation

◆ data

const double* CoppMatrixViewF64::data

Pointer to the first matrix element.

◆ rows

size_t CoppMatrixViewF64::rows

Number of matrix rows.

◆ cols

size_t CoppMatrixViewF64::cols

Number of matrix columns.

◆ layout

enum CoppMatrixLayout CoppMatrixViewF64::layout

Matrix memory layout.

◆ leading_dim

size_t CoppMatrixViewF64::leading_dim

Leading dimension / physical stride.

For column-major input this is the distance between consecutive columns, and must be at least rows for non-empty matrices. For row-major input this is the distance between consecutive rows, and must be at least cols for non-empty matrices.


The documentation for this struct was generated from the following file:
  • bindings/c/include/copp/core.h