Blitz logo

Blitz Support :

From: Hendrik Belitz (h.belitz_at_[hidden])
Date: 2003-12-04 04:20:10


Am Donnerstag, 4. Dezember 2003 01:01 schrieb Max:
> Hello, I'm just started experimenting with blitz++. Looks pretty neat.
>
> Now, I was wondering if their was some syntactic sugar for doing an
> operation like this:
>
> I have a, say, N x N matrix. I wish to create a N/2 x N/2 matrix from
> it, such that each entry is the mean of four locations in the original
> matrix. Basically, just doing a 2:1 downsampling of the matrix. I can
> of course, always do the two nested for loops, but was just curious.
>
> I don't think it quite fits as a stencil operation.

I think you could use strides ( see the Blitz++ user manual for that ) to
achieve this.

----------------------------------------------------------------
Dipl.-Inform. Hendrik Belitz
Zentrallabor für Elektronik
Forschungszentrum Jülich GmbH
D-52428 Jülich, Germany
Tel.: (++49)2461 61 4578
Fax: (++49)2461 61 3990
email: h.belitz_at_[hidden]