File: convolve.h

package info (click to toggle)
gnuastro 0.24-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 44,360 kB
  • sloc: ansic: 185,444; sh: 15,785; makefile: 1,303; cpp: 9
file content (53 lines) | stat: -rw-r--r-- 1,883 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/*********************************************************************
Convolve - Convolve input data with a given kernel.
Convolve is part of GNU Astronomy Utilities (Gnuastro) package.

Original author:
     Mohammad Akhlaghi <mohammad@akhlaghi.org>
Contributing author(s):
Copyright (C) 2015-2025 Free Software Foundation, Inc.

Gnuastro is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation, either version 3 of the License, or (at your
option) any later version.

Gnuastro is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
General Public License for more details.

You should have received a copy of the GNU General Public License
along with Gnuastro. If not, see <http://www.gnu.org/licenses/>.
**********************************************************************/
#ifndef CONVOLVE_H
#define CONVOLVE_H

#include <gnuastro/threads.h>
#include <gsl/gsl_fft_complex.h>

struct fftonthreadparams
{
  /* Operating info: */
  size_t                id; /* The number of this thread.               */
  struct convolveparams *p; /* Pointer to main program structure.       */
  int   forward1backwardn1; /* Operate on one or two images.            */
  size_t            stride; /* 1D FFT on rows or columns?               */

  /* Pointers to GSL FFT structures: */
  gsl_fft_complex_wavetable *ps0wave;
  gsl_fft_complex_wavetable *ps1wave;
  gsl_fft_complex_workspace *ps0work;
  gsl_fft_complex_workspace *ps1work;

  /* Thread parameters. */
  size_t          *indexs;  /* Indexs to be used in this thread.        */
  pthread_barrier_t    *b;  /* Barrier to keep threads waiting.         */
};


void
convolve(struct convolveparams *p);


#endif