File indexing completed on 2024-12-22 04:09:56
0001 ///////////////////////////////////////////////////////////////////////////// 0002 // einspline: a library for creating and evaluating B-splines // 0003 // Copyright (C) 2007 Kenneth P. Esler, Jr. // 0004 // // 0005 // This program is free software; you can redistribute it and/or modify // 0006 // it under the terms of the GNU General Public License as published by // 0007 // the Free Software Foundation; either version 2 of the License, or // 0008 // (at your option) any later version. // 0009 // // 0010 // This program is distributed in the hope that it will be useful, // 0011 // but WITHOUT ANY WARRANTY; without even the implied warranty of // 0012 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // 0013 // GNU General Public License for more details. // 0014 // // 0015 // You should have received a copy of the GNU General Public License // 0016 // along with this program; if not, write to the Free Software // 0017 // Foundation, Inc., 51 Franklin Street, Fifth Floor, // 0018 // Boston, MA 02110-1301 USA // 0019 ///////////////////////////////////////////////////////////////////////////// 0020 0021 #ifndef NUBSPLINE_STRUCTS_H 0022 #define NUBSPLINE_STRUCTS_H 0023 0024 #include "bspline_base.h" 0025 #include "nubasis.h" 0026 0027 typedef struct 0028 { 0029 spline_code sp_code; 0030 type_code t_code; 0031 void * restrict coefs; 0032 NUgrid *restrict x_grid; 0033 NUBasis *restrict x_basis; 0034 } NUBspline_1d; 0035 0036 typedef struct 0037 { 0038 spline_code sp_code; 0039 type_code t_code; 0040 void * restrict coefs; 0041 int x_stride; 0042 NUgrid *restrict x_grid, *restrict y_grid; 0043 NUBasis *restrict x_basis, *restrict y_basis; 0044 } NUBspline_2d; 0045 0046 typedef struct 0047 { 0048 spline_code sp_code; 0049 type_code t_code; 0050 void * restrict coefs; 0051 int x_stride, y_stride; 0052 NUgrid *restrict x_grid, *restrict y_grid, *restrict z_grid; 0053 NUBasis *restrict x_basis, *restrict y_basis, *restrict z_basis; 0054 } NUBspline_3d; 0055 0056 0057 /////////////////////////// 0058 // Single precision real // 0059 /////////////////////////// 0060 typedef struct 0061 { 0062 spline_code sp_code; 0063 type_code t_code; 0064 float* restrict coefs; 0065 NUgrid *restrict x_grid; 0066 NUBasis *restrict x_basis; 0067 BCtype_s xBC; 0068 } NUBspline_1d_s; 0069 0070 typedef struct 0071 { 0072 spline_code sp_code; 0073 type_code t_code; 0074 float* restrict coefs; 0075 int x_stride; 0076 NUgrid *restrict x_grid, *restrict y_grid; 0077 NUBasis *restrict x_basis, *restrict y_basis; 0078 BCtype_s xBC, yBC; 0079 } NUBspline_2d_s; 0080 0081 typedef struct 0082 { 0083 spline_code sp_code; 0084 type_code t_code; 0085 float* restrict coefs; 0086 int x_stride, y_stride; 0087 NUgrid *restrict x_grid, *restrict y_grid, *restrict z_grid; 0088 NUBasis *restrict x_basis, *restrict y_basis, *restrict z_basis; 0089 BCtype_s xBC, yBC, zBC; 0090 } NUBspline_3d_s; 0091 0092 /////////////////////////// 0093 // Double precision real // 0094 /////////////////////////// 0095 typedef struct 0096 { 0097 spline_code sp_code; 0098 type_code t_code; 0099 double* restrict coefs; 0100 NUgrid* restrict x_grid; 0101 NUBasis* restrict x_basis; 0102 BCtype_d xBC; 0103 } NUBspline_1d_d; 0104 0105 typedef struct 0106 { 0107 spline_code sp_code; 0108 type_code t_code; 0109 double* restrict coefs; 0110 int x_stride; 0111 NUgrid * restrict x_grid, * restrict y_grid; 0112 NUBasis * restrict x_basis, * restrict y_basis; 0113 BCtype_d xBC, yBC; 0114 } NUBspline_2d_d; 0115 0116 typedef struct 0117 { 0118 spline_code sp_code; 0119 type_code t_code; 0120 double* restrict coefs; 0121 int x_stride, y_stride; 0122 NUgrid *restrict x_grid, *restrict y_grid, *restrict z_grid; 0123 NUBasis *restrict x_basis, *restrict y_basis, *restrict z_basis; 0124 BCtype_d xBC, yBC, zBC; 0125 } NUBspline_3d_d; 0126 0127 ////////////////////////////// 0128 // Single precision complex // 0129 ////////////////////////////// 0130 typedef struct 0131 { 0132 spline_code sp_code; 0133 type_code t_code; 0134 complex_float* restrict coefs; 0135 NUgrid* restrict x_grid; 0136 NUBasis* restrict x_basis; 0137 BCtype_c xBC; 0138 } NUBspline_1d_c; 0139 0140 typedef struct 0141 { 0142 spline_code sp_code; 0143 type_code t_code; 0144 complex_float* restrict coefs; 0145 int x_stride; 0146 NUgrid* restrict x_grid, *restrict y_grid; 0147 NUBasis* restrict x_basis, *restrict y_basis; 0148 BCtype_c xBC, yBC; 0149 } NUBspline_2d_c; 0150 0151 typedef struct 0152 { 0153 spline_code sp_code; 0154 type_code t_code; 0155 complex_float* restrict coefs; 0156 int x_stride, y_stride; 0157 NUgrid *restrict x_grid, *restrict y_grid, *restrict z_grid; 0158 NUBasis *restrict x_basis, *restrict y_basis, *restrict z_basis; 0159 BCtype_c xBC, yBC, zBC; 0160 } NUBspline_3d_c; 0161 0162 ////////////////////////////// 0163 // Double precision complex // 0164 ////////////////////////////// 0165 typedef struct 0166 { 0167 spline_code sp_code; 0168 type_code t_code; 0169 complex_double* restrict coefs; 0170 NUgrid *restrict x_grid; 0171 NUBasis *restrict x_basis; 0172 BCtype_z xBC; 0173 } NUBspline_1d_z; 0174 0175 typedef struct 0176 { 0177 spline_code sp_code; 0178 type_code t_code; 0179 complex_double* restrict coefs; 0180 int x_stride; 0181 NUgrid *restrict x_grid, *restrict y_grid; 0182 NUBasis *restrict x_basis, *restrict y_basis; 0183 BCtype_z xBC, yBC; 0184 } NUBspline_2d_z; 0185 0186 typedef struct 0187 { 0188 spline_code sp_code; 0189 type_code t_code; 0190 complex_double* restrict coefs; 0191 int x_stride, y_stride; 0192 NUgrid *restrict x_grid, *restrict y_grid, *restrict z_grid; 0193 NUBasis *restrict x_basis, *restrict y_basis, *restrict z_basis; 0194 BCtype_z xBC, yBC, zBC; 0195 } NUBspline_3d_z; 0196 0197 #endif