Skip to content

Code gen LangC identity matrix lincomb  #17

@jarlebring

Description

@jarlebring

When using lincomb with an identity matrix it seems LangC causes problems.

Considering that ONE is declared as

    const double ZERO = 0.0;

I believe, this use of ONE should be something different:

https://github.com/jarlebring/GraphMatFun.jl/blob/2558b55495b7bafeaa0b6082105546407b83352f/src/gen_code.jl#L584-L589

which generates code like

    memcpy(memslots+(1-1)*n*n, A, n*n*sizeof(*memslots));
    cblas_dscal(n*n, coeff2, memslots+(1-1)*n*n, 1);
    cblas_daxpby(n*n, coeff1, &ONE, 0,
             ONE, memslots+(1-1)*n*n, n+1);

It segfaults.

The third parameter in axbpy should be a matrix/vector.

I wouldn't mind looking it myself with a hint of what was the plan

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

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy