# What are the extra arguments of some BLAS functions?

**URL:** <https://discourse.julialang.org/t/what-are-the-extra-arguments-of-some-blas-functions/81931>\
**Category:** General Usage\
**Created:** [May 30, 2022, 8:51pm UTC](https://discourse.julialang.org/t/what-are-the-extra-arguments-of-some-blas-functions/81931 "2022-05-30T20:51:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![PetrKryslUCSD](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/petrkryslucsd/32/215825_2.png) [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Post date:** [May 30, 2022, 8:51pm UTC](https://discourse.julialang.org/t/what-are-the-extra-arguments-of-some-blas-functions/81931/1 "2022-05-30T20:51:34Z")

</div>

Some BLAS functions called from the Julia standard library are passed  
extra arguments. For instance:

```julia
    ccall((@blasfunc(dtrsm_), libblastrampoline), Cvoid,
        (Ref{UInt8}, Ref{UInt8}, Ref{UInt8}, Ref{UInt8},
            Ref{BlasInt}, Ref{BlasInt}, Ref{FT}, Ptr{FT},
            Ref{BlasInt}, Ptr{FT}, Ref{BlasInt},
            Clong, Clong, Clong, Clong),
        side, uplo, transa, diag,
        m, n, alpha, A, lda, B, ldb,
        1, 1, 1, 1)

```

The four `Clong`, in this example… Does anyone know what that is about?

---

<div class="post-metadata">

**Author:** ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)\
**Post date:** [May 30, 2022, 9:18pm UTC](https://discourse.julialang.org/t/what-are-the-extra-arguments-of-some-blas-functions/81931/2 "2022-05-30T21:18:10Z")

</div>

> [@PetrKryslUCSD](#):
>
> The four `Clong` , in this example… Does anyone know what that is about?

I assume you’re referring to [these lines](https://github.com/JuliaLang/julia/blob/b2bce475079b4cdc3d7a598aa5752ea38efd9f0f/stdlib/LinearAlgebra/src/blas.jl#L2033-L2041). `git blame` says that they were added by [Adjust calling convention of LAPACK functions by vchuravy · Pull Request #38836 · JuliaLang/julia · GitHub](https://github.com/JuliaLang/julia/pull/38836) — the explanation is that they are “hidden” arguments corresponding to the lengths of the four character arguments (`side`, `uplo`, `transa`, and `diag`), as required by the Fortran ABI.
