File indexing completed on 2024-12-22 04:09:51
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 MULTI_BSPLINE_STRUCTS_STD_H 0022 #define MULTI_BSPLINE_STRUCTS_STD_H 0023 0024 0025 /////////////////////////// 0026 // Single precision real // 0027 /////////////////////////// 0028 typedef struct 0029 { 0030 spline_code spcode; 0031 type_code tcode; 0032 float* restrict coefs; 0033 intptr_t x_stride; 0034 Ugrid x_grid; 0035 BCtype_s xBC; 0036 int num_splines; 0037 } multi_UBspline_1d_s; 0038 0039 typedef struct 0040 { 0041 spline_code spcode; 0042 type_code tcode; 0043 float* restrict coefs; 0044 intptr_t x_stride, y_stride; 0045 Ugrid x_grid, y_grid; 0046 BCtype_s xBC, yBC; 0047 int num_splines; 0048 } multi_UBspline_2d_s; 0049 0050 typedef struct 0051 { 0052 spline_code spcode; 0053 type_code tcode; 0054 float* restrict coefs; 0055 intptr_t x_stride, y_stride, z_stride; 0056 Ugrid x_grid, y_grid, z_grid; 0057 BCtype_s xBC, yBC, zBC; 0058 int num_splines; 0059 } multi_UBspline_3d_s; 0060 0061 0062 /////////////////////////// 0063 // Double precision real // 0064 /////////////////////////// 0065 typedef struct 0066 { 0067 spline_code spcode; 0068 type_code tcode; 0069 double* restrict coefs; 0070 intptr_t x_stride; 0071 Ugrid x_grid; 0072 BCtype_d xBC; 0073 int num_splines; 0074 } multi_UBspline_1d_d; 0075 0076 typedef struct 0077 { 0078 spline_code spcode; 0079 type_code tcode; 0080 double* restrict coefs; 0081 intptr_t x_stride, y_stride; 0082 Ugrid x_grid, y_grid; 0083 BCtype_d xBC, yBC; 0084 int num_splines; 0085 } multi_UBspline_2d_d; 0086 0087 typedef struct 0088 { 0089 spline_code spcode; 0090 type_code tcode; 0091 double* restrict coefs; 0092 intptr_t x_stride, y_stride, z_stride; 0093 Ugrid x_grid, y_grid, z_grid; 0094 BCtype_d xBC, yBC, zBC; 0095 int num_splines; 0096 } multi_UBspline_3d_d; 0097 0098 0099 0100 ////////////////////////////// 0101 // Single precision complex // 0102 ////////////////////////////// 0103 typedef struct 0104 { 0105 spline_code spcode; 0106 type_code tcode; 0107 complex_float* restrict coefs; 0108 intptr_t x_stride; 0109 Ugrid x_grid; 0110 BCtype_c xBC; 0111 int num_splines; 0112 } multi_UBspline_1d_c; 0113 0114 typedef struct 0115 { 0116 spline_code spcode; 0117 type_code tcode; 0118 complex_float* restrict coefs; 0119 intptr_t x_stride, y_stride; 0120 Ugrid x_grid, y_grid; 0121 BCtype_c xBC, yBC; 0122 int num_splines; 0123 // temporary storage for laplacian components 0124 complex_float* restrict lapl2; 0125 } multi_UBspline_2d_c; 0126 0127 typedef struct 0128 { 0129 spline_code spcode; 0130 type_code tcode; 0131 complex_float* restrict coefs; 0132 intptr_t x_stride, y_stride, z_stride; 0133 Ugrid x_grid, y_grid, z_grid; 0134 BCtype_c xBC, yBC, zBC; 0135 int num_splines; 0136 // temporary storage for laplacian components 0137 complex_float* restrict lapl3; 0138 } multi_UBspline_3d_c; 0139 0140 0141 ////////////////////////////// 0142 // Double precision complex // 0143 ////////////////////////////// 0144 typedef struct 0145 { 0146 spline_code spcode; 0147 type_code tcode; 0148 complex_double* restrict coefs; 0149 intptr_t x_stride; 0150 Ugrid x_grid; 0151 BCtype_z xBC; 0152 int num_splines; 0153 } multi_UBspline_1d_z; 0154 0155 typedef struct 0156 { 0157 spline_code spcode; 0158 type_code tcode; 0159 complex_double* restrict coefs; 0160 intptr_t x_stride, y_stride; 0161 Ugrid x_grid, y_grid; 0162 BCtype_z xBC, yBC; 0163 int num_splines; 0164 // temporary storage for laplacian components 0165 complex_double* restrict lapl2; 0166 } multi_UBspline_2d_z; 0167 0168 typedef struct 0169 { 0170 spline_code spcode; 0171 type_code tcode; 0172 complex_double* restrict coefs; 0173 intptr_t x_stride, y_stride, z_stride; 0174 Ugrid x_grid, y_grid, z_grid; 0175 BCtype_z xBC, yBC, zBC; 0176 int num_splines; 0177 // temporary storage for laplacian components 0178 complex_double* restrict lapl3; 0179 } multi_UBspline_3d_z; 0180 0181 0182 #endif