From mboxrd@z Thu Jan 1 00:00:00 1970
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on
ip-172-31-65-14.ec2.internal
X-Spam-Level:
X-Spam-Status: No, score=-0.0 required=3.0 tests=BAYES_40,FREEMAIL_FROM,
T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6
X-Received: by 2002:a05:620a:1278:b0:705:74fe:b39a with SMTP id b24-20020a05620a127800b0070574feb39amr1363245qkl.616.1674522279610;
Mon, 23 Jan 2023 17:04:39 -0800 (PST)
X-Received: by 2002:a05:6870:e97:b0:144:bbfc:ba96 with SMTP id
mm23-20020a0568700e9700b00144bbfcba96mr1639810oab.18.1674522279344; Mon, 23
Jan 2023 17:04:39 -0800 (PST)
Path: eternal-september.org!reader01.eternal-september.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.ada
Date: Mon, 23 Jan 2023 17:04:39 -0800 (PST)
In-Reply-To:
Injection-Info: google-groups.googlegroups.com; posting-host=157.143.56.236; posting-account=Wbe3fAoAAAALa8UT9MWTy6mw2ahlRJms
NNTP-Posting-Host: 157.143.56.236
References: <9c7cccd9-733f-49a8-b482-087ccb14b58dn@googlegroups.com>
<2801afb2-045f-4fec-b41e-f83b2c80e672n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <446867f7-526d-429f-951a-da1a97efff4dn@googlegroups.com>
Subject: Re: Real_Arrays on heap with overloaded operators and clean syntax
From: Jim Paloander
Injection-Date: Tue, 24 Jan 2023 01:04:39 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 3397
Xref: reader01.eternal-september.org comp.lang.ada:64871
List-Id:
Dmitry,
you mentioned in a previous email
> You should not use the standard library anyway. It is not intended for=20
> large problems, which require specific approaches and methods, like=20
> sparse matrices, concurrent processing and so on.
> > The optimal way to work large linear algebra problem is what you descri=
be because unfortunately ADA does not allow what Fortran does since 30 year=
s ago or more.
> I am not sure what you mean. It is quite possible to design a wrapper=20
that the optimal way is to work with specific approaches and methods. Never=
theless, at least for vector operations, and/or dense matrices operations, =
ADA should provide native support of vector-math or Vector.Numerics, or Adv=
ancedNumerics or Numerics.LinearAlgebra and/or Numerics.SparseLinearAlgebra=
. Honestly with all the mission critical applications ADA is used for, I wo=
uld expect something like that to enable people working in scientific compu=
ting and in general wherever Linear Algebra kernels are essential tool of t=
he core algorithms development.
So it seems that as you correctly implied even dense linear vector math are=
not enough. But it is at least what I hoped for. Sparse matrix times vecto=
r could be stored in a temporary vector. I would not expect that an express=
ion such as
y :=3D alpha*a + beta*(z-w*gamma) + alpha*beta*SparseMat*x;
is computed in a way similar to Fortran, which is=20
for I in 1 .. N loop
y[I] :=3D alpha*a[I] + beta*(z[I] - w[I]*gamma) + alpha*beta*Sum_j ( Spa=
rseMat[I,j]*x[j])
end
where Sum_j is implemented in another loop. I would instead compute v :=3D =
SparseMat*x, and then replace SparseMat*x with v in the above expression. S=
o I would be happy if ADA would give me a library that allows Vector Math w=
ith performance similar to Fortran without temporaries for both Complex and=
Real numbers. If they could provide that also for Sparse Linear Algebra ev=
en better even for CSR format, because there are plenty Sparse Matrix forma=
ts for Sparse linear Algebra.
Thanks.