help-gsl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-gsl] What is the purpose of the stride?


From: Marco Maggi
Subject: Re: [Help-gsl] What is the purpose of the stride?
Date: Fri, 18 Sep 2009 07:38:02 +0200

"Jim Ward" wrote:
> What is the purpose of the stride? Can someone give me an
> example when the stride wouldn't be 1?

I assume you refer to the stride of vectors: It is a feature
that allows  you the use  a vector as  a view over  a matrix
column or diagonal.  The matrix:

1 2 3
4 5 6
7 8 9

is laid out in memory as:

1 2 3 4 5 6 7 8 9

taking initial offset 1 and stride 3, you see it as:

2 5 8

which is a column; taking offset  0 and stride 4, you see it
as:

1 5 9

which is a diagonal.
-- 
Marco Maggi




reply via email to

[Prev in Thread] Current Thread [Next in Thread]