I believe that Tony is suggesting manually applying the sparse operator 
rather than explicitly constructing it and then applying it. This is a 
common (and significant) performance optimization when a sparse operator is 
only used once or twice, as the construction of the sparse matrix is often 
*more* expensive than applying it once. 

The answer to your question (since you are applying the sparse matrix from 
the right to a row vector) would be a loop of the form: forall nonzero 
triplets (i,j,value),  y[j] += x[i] * value.

On Tuesday, September 15, 2015 at 8:52:46 AM UTC-7, Frank Kampas wrote:
>
> Could you post a link to the part of the documentation that describes how 
> to do that?
>
> On Tuesday, September 15, 2015 at 3:53:11 AM UTC-4, Tony Kelman wrote:
>>
>> Instead of constructing a sparse matrix in the inner loop it would be 
>> more efficient to write an in place stencil kernel function to perform the 
>> equivalent operation.
>
>

Reply via email to