Skip to content

geadd and const qualifiers #4912

@david-cortes

Description

@david-cortes

In the wiki for OpenBLAS extensions:
https://github.com/OpenMathLib/OpenBLAS/wiki/OpenBLAS-Extensions

It describes ?geadd as follows:

ATLAS-like matrix add B = αA+βB

But in the header for function geadd:

void cblas_dgeadd(OPENBLAS_CONST enum CBLAS_ORDER CORDER,OPENBLAS_CONST blasint crows, OPENBLAS_CONST blasint ccols, OPENBLAS_CONST double calpha, double *a, OPENBLAS_CONST blasint clda, OPENBLAS_CONST double cbeta,

The type for A is a regular pointer instead of a const pointer.

Other extensions such as ?omatcopy use const qualifiers in the pointers to data that they do not modify:

void cblas_domatcopy(OPENBLAS_CONST enum CBLAS_ORDER CORDER, OPENBLAS_CONST enum CBLAS_TRANSPOSE CTRANS, OPENBLAS_CONST blasint crows, OPENBLAS_CONST blasint ccols, OPENBLAS_CONST double calpha, OPENBLAS_CONST double *a,

Is ?geadd meant to have a const qualifier for A in the signature, or can it potentially modify the data that it gets passed?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions