Skip to content

Julia code gen improvements #29

@jarlebring

Description

@jarlebring

Based on https://discourse.julialang.org/t/uniform-scaling-inplace-addition-with-matrix/59928 some improvements can be done in the julia code gen:

  • add a function inplace_scale_add!(a,A,B::UniformScaling) which computes A=a*A+B where B=I is UniformScaling with for-loop as in discourse
  • add a function inplace_scale_add!(a,A,B::Matrix) which computes A=a*A+B, essentially replacing BLAS.axpby! calls with dot operation. Direct BLAS-calls should be avoided in julia.
  • Replace codes like this with a copy-call and subsequently a call to inplace_scale_add!
    memslots[6][:]=coeff1*memslots[2] + coeff2*memslots[3]

The functions should maybe take into account if a coefficient is one since it can be made more efficient. Maybe we need more functions, e.g. just inplace_add and inplace_scale_add_scale! and inplace_add_scale!.

Metadata

Metadata

Assignees

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