Main Page | Files | Data Structures | Functions | Global Variables |
include/gpiv/gpiv-piv_utils.h
Go to the documentation of this file.
00001 /* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 4 c-style: "K&R" -*- */
00002 
00003 /*
00004    libgpiv - library for Particle Image Velocimetry
00005 
00006    Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 Gerber van der Graaf
00007 
00008    This file is part of libgpiv.
00009 
00010    Libgpiv is free software; you can redistribute it and/or modify
00011    it under the terms of the GNU General Public License as published by
00012    the Free Software Foundation; either version 2, or (at your option)
00013    any later version.
00014 
00015    This program is distributed in the hope that it will be useful,
00016    but WITHOUT ANY WARRANTY; without even the implied warranty of
00017    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018    GNU General Public License for more details.
00019 
00020    You should have received a copy of the GNU General Public License
00021    along with this program; if not, write to the Free Software Foundation,
00022    Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  
00023 
00024 
00025 
00026 
00027 -------------------------------------------------------------------------------
00028 LIBRARY:                 libgpiv:
00029 EXTERNAL FUNCTIONS:
00030              gpiv_null_pivdata
00031                          gpiv_alloc_pivdata
00032                          gpiv_check_alloc_pivdata
00033              gpiv_free_pivdata
00034                          gpiv_0_pivdata
00035                          gpiv_cp_pivdata
00036                          gpiv_add_dxdy_pivdata
00037                          gpiv_sum_dxdy_pivdata
00038 
00039                          gpiv_alloc_cov
00040              gpiv_free_cov
00041 
00042                          gpiv_piv_mpi_bcast_pivdata
00043 
00044 LAST MODIFICATION DATE:  $Id: gpiv-piv_utils.h,v 1.2 2008-09-25 13:19:53 gerber Exp $
00045  --------------------------------------------------------------------------- */
00055 #ifndef __LIBGPIV_PIV_UTILS_H__
00056 #define __LIBGPIV_PIV_UTILS_H__
00057 
00065 void
00066 gpiv_null_pivdata           (GpivPivData        *piv_data
00067                     );
00068 
00069 
00077 GpivPivData *
00078 gpiv_alloc_pivdata          (const guint        nx,
00079                     const guint     ny
00080                     );
00081 
00088 gchar *
00089 gpiv_check_alloc_pivdata        (const GpivPivData      *piv_data
00090                     );
00091 
00100 void 
00101 gpiv_free_pivdata           (GpivPivData        *piv_data
00102                     );
00103 
00104 
00105 
00114 gchar *
00115 gpiv_0_pivdata              (const GpivPivData  *piv_data
00116                     );
00117 
00118 
00119 
00128 GpivPivData *
00129 gpiv_cp_pivdata             (const GpivPivData      *piv_data
00130                     );
00131 
00132 
00142 gchar *
00143 gpiv_ovwrt_pivdata          (const GpivPivData      *piv_data_in,
00144                     const GpivPivData   *piv_data_out
00145                     );
00146 
00147 
00148 
00158 gchar *
00159 gpiv_add_dxdy_pivdata           (const GpivPivData      *piv_data_in,
00160                     GpivPivData     *piv_data_out
00161                     );
00162 
00163 
00164 
00174 gchar * 
00175 gpiv_sum_dxdy_pivdata           (const GpivPivData      *piv_data,
00176                     gfloat          *sum
00177                     );
00178 
00179 
00180 
00193 gchar *
00194 gpiv_piv_gnuplot            (const gchar            *title, 
00195                     const gfloat        gnuplot_scale,
00196                     const gchar     *GNUPLOT_DISPLAY_COLOR, 
00197                     const guint     GNUPLOT_DISPLAY_SIZE,
00198                     const GpivImagePar  *image_par, 
00199                     const GpivPivPar    *piv_par,
00200                     const GpivPivData   *piv_data
00201                     );
00202 
00203 
00204 
00212 GpivCov *
00213 gpiv_alloc_cov              (const guint            int_size0,
00214                     const gboolean      x_corr
00215                     );
00216 
00223 void 
00224 gpiv_free_cov               (GpivCov        *cov
00225                     );
00226 
00227 
00228 /*
00229  * Some MPI routines
00230  */
00231 #ifdef ENABLE_MPI
00232 
00244 void
00245 gpiv_piv_mpi_scatter_pivdata        (GpivPivData        *pd, 
00246                                     GpivPivData         *pd_scat, 
00247                                     guint           nprocs
00248                                     );
00249 
00259 void 
00260 gpiv_piv_mpi_gather_pivdata         (GpivPivData        *pd_scat, 
00261                                     GpivPivData         *pd, 
00262                                     guint           nprocs
00263                     );
00264 
00272 gint * 
00273 gpiv_piv_mpi_compute_counts     (const guint        nx, 
00274                                     const guint         ny
00275                     );
00276 
00285 gint * 
00286 gpiv_piv_mpi_compute_displs     (gint           *counts, 
00287                                     const guint         nx, 
00288                                     const guint         ny
00289                     );
00290 
00305 void
00306 gpiv_piv_mpi_scatterv_pivdata       (GpivPivData        *pd, 
00307                                     GpivPivData         *pd_scat, 
00308                                     gint            *counts,
00309                                     gint            *displs
00310                     );
00311 
00326 void 
00327 gpiv_piv_mpi_gatherv_pivdata        (GpivPivData        *pd_scat, 
00328                                     GpivPivData         *pd, 
00329                                     gint            *counts,
00330                                     gint            *displs
00331                     );
00332 
00342 void 
00343 gpiv_piv_mpi_bcast_pivdata      (GpivPivData        *pd
00344                     );
00345 
00346 #endif /* ENABLE_MPI */
00347 #endif /* __LIBGPIV_PIV_UTILS_H__ */