ParSpMatVec.jl
Shared-memory implementation of parallel sparse matrix vector product in Julia
Install / Use
/learn @JuliaInv/ParSpMatVec.jlREADME
ParSpMatVec.jl
Shared-memory implementation of parallel sparse matrix vector product in Julia. We thank Roman Shekhtman (UBC) for providing the Fortran code.
Installation
To install on a unix machine, follow these steps
Pkg.add("ParSpMatVec")
Pkg.test("ParSpMatVec")
The first line downloads the package and (on unix) compiles the Fortran codes (gfortran is used by default). Currently there is no automatic build procedure for Windows. Pull requests are welcome.
The second line tests the package.
Usage
Currently, we do not overload the matrix vector product in Base (this might be added in the future). Let A be a sparse matrix, alpha and beta floating point numbers and x and y be real- or complex values vectors of appropriate size. Then, the following commands are equivalent
nproc = 4; # choose number of OMP threads
yt = copy(y)
y = beta*y + alpha * A*x
ParSpMatVec.A_mul_B!( alpha, A, x, beta, yt, nproc)
Similarly, for the transpose matrix-vector product:
yt= copy(y)
y = beta*y + alpha * A'*x
ParSpMatVec.Ac_mul_B!( alpha, A, x, beta, yt, nproc)
The last input, nproc, determines how many OpenMP threads are used. Note that, due to the compressed column storage, products with the adjoint of A are expected to scale better.
ToDo
A few things to do:
- [ ] automatic build on Windows
Related Skills
node-connect
352.9kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
111.5kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
352.9kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
352.9kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
