module hconest { # masked helix convolution, adjoint is the filter. use helix real, dimension (:), pointer :: x type( filter) :: aa #% _init( x, aa) #% _lop( a, y) integer ia, ix, iy do ia = 1, size( a) { do iy = 1 + aa%lag( ia), size( y) { if( aa%mis( iy)) cycle ix = iy - aa%lag( ia) if( adj) a( ia) += y( iy) * x( ix) else y( iy) += a( ia) * x( ix) } } }