GDAL
gdalgrid_priv.h
1 /******************************************************************************
2  * $Id: gdalgrid_priv.h 29314 2015-06-05 20:21:11Z rouault $
3  *
4  * Project: GDAL Gridding API.
5  * Purpose: Prototypes, and definitions for of GDAL scattered data gridder.
6  * Author: Even Rouault, <even dot rouault at mines dash paris dot org>
7  *
8  ******************************************************************************
9  * Copyright (c) 2013, Even Rouault <even dot rouault at mines-paris dot org>
10  *
11  * Permission is hereby granted, free of charge, to any person obtaining a
12  * copy of this software and associated documentation files (the "Software"),
13  * to deal in the Software without restriction, including without limitation
14  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
15  * and/or sell copies of the Software, and to permit persons to whom the
16  * Software is furnished to do so, subject to the following conditions:
17  *
18  * The above copyright notice and this permission notice shall be included
19  * in all copies or substantial portions of the Software.
20  *
21  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
22  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
24  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
26  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
27  * DEALINGS IN THE SOFTWARE.
28  ****************************************************************************/
29 
30 #include "cpl_error.h"
31 #include "cpl_quad_tree.h"
32 
33 typedef struct
34 {
35  const double* padfX;
36  const double* padfY;
38 
39 typedef struct
40 {
41  GDALGridXYArrays* psXYArrays;
42  int i;
44 
45 typedef struct
46 {
47  CPLQuadTree* hQuadTree;
48  double dfInitialSearchRadius;
49  const float *pafX;
50  const float *pafY;
51  const float *pafZ;
53 
54 #ifdef HAVE_SSE_AT_COMPILE_TIME
55 int CPLHaveRuntimeSSE();
56 
57 CPLErr
58 GDALGridInverseDistanceToAPower2NoSmoothingNoSearchSSE(
59  const void *poOptions,
60  GUInt32 nPoints,
61  const double *unused_padfX,
62  const double *unused_padfY,
63  const double *unused_padfZ,
64  double dfXPoint, double dfYPoint,
65  double *pdfValue,
66  void* hExtraParamsIn );
67 #endif
68 
69 #ifdef HAVE_AVX_AT_COMPILE_TIME
70 int CPLHaveRuntimeAVX();
71 
72 CPLErr GDALGridInverseDistanceToAPower2NoSmoothingNoSearchAVX(
73  const void *poOptions,
74  GUInt32 nPoints,
75  const double *unused_padfX,
76  const double *unused_padfY,
77  const double *unused_padfZ,
78  double dfXPoint, double dfYPoint,
79  double *pdfValue,
80  void* hExtraParamsIn );
81 #endif
82 
83 #if defined(__GNUC__)
84 #if defined(__x86_64)
85 #define GCC_CPUID(level, a, b, c, d) \
86  __asm__ ("xchgq %%rbx, %q1\n" \
87  "cpuid\n" \
88  "xchgq %%rbx, %q1" \
89  : "=a" (a), "=r" (b), "=c" (c), "=d" (d) \
90  : "0" (level))
91 #else
92 #define GCC_CPUID(level, a, b, c, d) \
93  __asm__ ("xchgl %%ebx, %1\n" \
94  "cpuid\n" \
95  "xchgl %%ebx, %1" \
96  : "=a" (a), "=r" (b), "=c" (c), "=d" (d) \
97  : "0" (level))
98 #endif
99 #endif
Definition: gdalgrid_priv.h:45
Quad tree implementation.
Definition: gdalgrid_priv.h:33
CPL error handling services.
Definition: gdalgrid_priv.h:39

Generated for GDAL by doxygen 1.8.11.