@@ -1166,6 +1166,9 @@ typedef std::complex<float> fcomplex;
1166
1166
else if (strcmp (fname[ifield]," gpu_device_id" ) == 0 ) {
1167
1167
oc->gpu_device_id = (int )round (*mxGetPr (mxGetFieldByNumber (om,idx,ifield)));
1168
1168
}
1169
+ else if (strcmp (fname[ifield]," gpu_np" ) == 0 ) {
1170
+ oc->gpu_np = (int )round (*mxGetPr (mxGetFieldByNumber (om,idx,ifield)));
1171
+ }
1169
1172
else
1170
1173
continue ;
1171
1174
}
@@ -1328,7 +1331,7 @@ mxWrapCopyZDef_single (mxWrapCopy_single_dcomplex, dcomplex,
1328
1331
mxWrapReturnZDef_single (mxWrapReturn_single_dcomplex, dcomplex,
1329
1332
real_dcomplex, imag_dcomplex)
1330
1333
1331
- /* ---- cufinufft.mw: 153 ----
1334
+ /* ---- cufinufft.mw: 156 ----
1332
1335
* cufinufft_opts* o = new();
1333
1336
*/
1334
1337
static const char* stubids1_ = "c o cufinufft_opts* = new()";
@@ -1349,7 +1352,7 @@ mw_err_label:
1349
1352
mexErrMsgTxt (mw_err_txt_);
1350
1353
}
1351
1354
1352
- /* ---- cufinufft.mw: 155 ----
1355
+ /* ---- cufinufft.mw: 158 ----
1353
1356
* cufinufft_plan* p = new();
1354
1357
*/
1355
1358
static const char * stubids2_ = " c o cufinufft_plan* = new()" ;
@@ -1370,9 +1373,9 @@ mw_err_label:
1370
1373
mexErrMsgTxt (mw_err_txt_);
1371
1374
}
1372
1375
1373
- /* ---- cufinufft.mw: 156 ----
1376
+ /* ---- cufinufft.mw: 159 ----
1374
1377
* cufinufft_default_opts(cufinufft_opts* o);
1375
- * Also at cufinufft.mw: 159
1378
+ * Also at cufinufft.mw: 162
1376
1379
*/
1377
1380
static const char * stubids3_ = " cufinufft_default_opts(c i cufinufft_opts*)" ;
1378
1381
@@ -1395,7 +1398,7 @@ mw_err_label:
1395
1398
mexErrMsgTxt (mw_err_txt_);
1396
1399
}
1397
1400
1398
- /* ---- cufinufft.mw: 158 ----
1401
+ /* ---- cufinufft.mw: 161 ----
1399
1402
* cufinufftf_plan* p = new();
1400
1403
*/
1401
1404
static const char * stubids4_ = " c o cufinufftf_plan* = new()" ;
@@ -1416,7 +1419,7 @@ mw_err_label:
1416
1419
mexErrMsgTxt (mw_err_txt_);
1417
1420
}
1418
1421
1419
- /* ---- cufinufft.mw: 170 ----
1422
+ /* ---- cufinufft.mw: 173 ----
1420
1423
* copy_cufinufft_opts(mxArray opts, cufinufft_opts* o);
1421
1424
*/
1422
1425
static const char * stubids6_ = " copy_cufinufft_opts(c i mxArray, c i cufinufft_opts*)" ;
@@ -1443,7 +1446,7 @@ mw_err_label:
1443
1446
mexErrMsgTxt (mw_err_txt_);
1444
1447
}
1445
1448
1446
- /* ---- cufinufft.mw: 173 ----
1449
+ /* ---- cufinufft.mw: 176 ----
1447
1450
* int ier = cufinufft_makeplan(int type, int dim, int64_t[3] n_modes, int iflag, int n_trans, double tol, cufinufft_plan* plan, cufinufft_opts* o);
1448
1451
*/
1449
1452
static const char * stubids7_ = " c o int = cufinufft_makeplan(c i int, c i int, c i int64_t[x], c i int, c i int, c i double, c i cufinufft_plan*, c i cufinufft_opts*)" ;
@@ -1536,7 +1539,7 @@ mw_err_label:
1536
1539
mexErrMsgTxt (mw_err_txt_);
1537
1540
}
1538
1541
1539
- /* ---- cufinufft.mw: 176 ----
1542
+ /* ---- cufinufft.mw: 179 ----
1540
1543
* int ier = cufinufftf_makeplan(int type, int dim, int64_t[3] n_modes, int iflag, int n_trans, float tol, cufinufftf_plan* plan, cufinufft_opts* o);
1541
1544
*/
1542
1545
static const char * stubids8_ = " c o int = cufinufftf_makeplan(c i int, c i int, c i int64_t[x], c i int, c i int, c i float, c i cufinufftf_plan*, c i cufinufft_opts*)" ;
@@ -1629,7 +1632,7 @@ mw_err_label:
1629
1632
mexErrMsgTxt (mw_err_txt_);
1630
1633
}
1631
1634
1632
- /* ---- cufinufft.mw: 178 ----
1635
+ /* ---- cufinufft.mw: 181 ----
1633
1636
* delete(cufinufft_opts* o);
1634
1637
*/
1635
1638
static const char * stubids9_ = " delete(c i cufinufft_opts*)" ;
@@ -1653,7 +1656,7 @@ mw_err_label:
1653
1656
mexErrMsgTxt (mw_err_txt_);
1654
1657
}
1655
1658
1656
- /* ---- cufinufft.mw: 208 ----
1659
+ /* ---- cufinufft.mw: 211 ----
1657
1660
* int ier = cufinufft_setpts(cufinufft_plan plan, int nj, gpu double[] xj, gpu double[] yj, gpu double[] zj, int nk, gpu double[] s, gpu double[] t, gpu double[] u);
1658
1661
*/
1659
1662
static const char * stubids10_ = " c o int = cufinufft_setpts(c i cufinufft_plan, c i int, g i double[], g i double[], g i double[], c i int, g i double[], g i double[], g i double[])" ;
@@ -1765,7 +1768,7 @@ mw_err_label:
1765
1768
mexErrMsgTxt (mw_err_txt_);
1766
1769
}
1767
1770
1768
- /* ---- cufinufft.mw: 210 ----
1771
+ /* ---- cufinufft.mw: 213 ----
1769
1772
* int ier = cufinufftf_setpts(cufinufftf_plan plan, int nj, gpu float[] xj, gpu float[] yj, gpu float[] zj, int nk, gpu float[] s, gpu float[] t, gpu float[] u);
1770
1773
*/
1771
1774
static const char * stubids11_ = " c o int = cufinufftf_setpts(c i cufinufftf_plan, c i int, g i float[], g i float[], g i float[], c i int, g i float[], g i float[], g i float[])" ;
@@ -1877,7 +1880,7 @@ mw_err_label:
1877
1880
mexErrMsgTxt (mw_err_txt_);
1878
1881
}
1879
1882
1880
- /* ---- cufinufft.mw: 242 ----
1883
+ /* ---- cufinufft.mw: 245 ----
1881
1884
* int ier = cufinufft_execute(cufinufft_plan plan, gpu dcomplex[] data_in, gpu output dcomplex[ncoeffs] result);
1882
1885
*/
1883
1886
static const char * stubids12_ = " c o int = cufinufft_execute(c i cufinufft_plan, g i dcomplex[], g o dcomplex[x])" ;
@@ -1935,7 +1938,7 @@ mw_err_label:
1935
1938
mexErrMsgTxt (mw_err_txt_);
1936
1939
}
1937
1940
1938
- /* ---- cufinufft.mw: 244 ----
1941
+ /* ---- cufinufft.mw: 247 ----
1939
1942
* int ier = cufinufftf_execute(cufinufftf_plan plan, gpu fcomplex[] data_in, gpu output fcomplex[ncoeffs] result);
1940
1943
*/
1941
1944
static const char * stubids13_ = " c o int = cufinufftf_execute(c i cufinufftf_plan, g i fcomplex[], g o fcomplex[x])" ;
@@ -1993,7 +1996,7 @@ mw_err_label:
1993
1996
mexErrMsgTxt (mw_err_txt_);
1994
1997
}
1995
1998
1996
- /* ---- cufinufft.mw: 250 ----
1999
+ /* ---- cufinufft.mw: 253 ----
1997
2000
* int ier = cufinufft_execute(cufinufft_plan plan, gpu output dcomplex[nj, n_trans] result, gpu dcomplex[] data_in);
1998
2001
*/
1999
2002
static const char * stubids14_ = " c o int = cufinufft_execute(c i cufinufft_plan, g o dcomplex[xx], g i dcomplex[])" ;
@@ -2053,7 +2056,7 @@ mw_err_label:
2053
2056
mexErrMsgTxt (mw_err_txt_);
2054
2057
}
2055
2058
2056
- /* ---- cufinufft.mw: 252 ----
2059
+ /* ---- cufinufft.mw: 255 ----
2057
2060
* int ier = cufinufftf_execute(cufinufftf_plan plan, gpu output fcomplex[nj, n_trans] result, gpu fcomplex[] data_in);
2058
2061
*/
2059
2062
static const char * stubids15_ = " c o int = cufinufftf_execute(c i cufinufftf_plan, g o fcomplex[xx], g i fcomplex[])" ;
@@ -2113,7 +2116,7 @@ mw_err_label:
2113
2116
mexErrMsgTxt (mw_err_txt_);
2114
2117
}
2115
2118
2116
- /* ---- cufinufft.mw: 256 ----
2119
+ /* ---- cufinufft.mw: 259 ----
2117
2120
* int ier = cufinufft_execute(cufinufft_plan plan, gpu dcomplex[] data_in, gpu output dcomplex[nk, n_trans] result);
2118
2121
*/
2119
2122
static const char * stubids16_ = " c o int = cufinufft_execute(c i cufinufft_plan, g i dcomplex[], g o dcomplex[xx])" ;
@@ -2173,7 +2176,7 @@ mw_err_label:
2173
2176
mexErrMsgTxt (mw_err_txt_);
2174
2177
}
2175
2178
2176
- /* ---- cufinufft.mw: 258 ----
2179
+ /* ---- cufinufft.mw: 261 ----
2177
2180
* int ier = cufinufftf_execute(cufinufftf_plan plan, gpu fcomplex[] data_in, gpu output fcomplex[nk, n_trans] result);
2178
2181
*/
2179
2182
static const char * stubids17_ = " c o int = cufinufftf_execute(c i cufinufftf_plan, g i fcomplex[], g o fcomplex[xx])" ;
@@ -2233,7 +2236,7 @@ mw_err_label:
2233
2236
mexErrMsgTxt (mw_err_txt_);
2234
2237
}
2235
2238
2236
- /* ---- cufinufft.mw: 270 ----
2239
+ /* ---- cufinufft.mw: 273 ----
2237
2240
* cufinufft_destroy(cufinufft_plan plan);
2238
2241
*/
2239
2242
static const char * stubids18_ = " cufinufft_destroy(c i cufinufft_plan)" ;
@@ -2261,7 +2264,7 @@ mw_err_label:
2261
2264
mexErrMsgTxt (mw_err_txt_);
2262
2265
}
2263
2266
2264
- /* ---- cufinufft.mw: 272 ----
2267
+ /* ---- cufinufft.mw: 275 ----
2265
2268
* cufinufftf_destroy(cufinufftf_plan plan);
2266
2269
*/
2267
2270
static const char * stubids19_ = " cufinufftf_destroy(c i cufinufftf_plan)" ;
@@ -2356,24 +2359,24 @@ void mexFunction(int nlhs, mxArray* plhs[],
2356
2359
} else if (strcmp (id, " *profile report*" ) == 0 ) {
2357
2360
if (!mexprofrecord_)
2358
2361
mexPrintf (" Profiler inactive\n " );
2359
- mexPrintf (" %d calls to cufinufft.mw:153 \n " , mexprofrecord_[1 ]);
2360
- mexPrintf (" %d calls to cufinufft.mw:155 \n " , mexprofrecord_[2 ]);
2361
- mexPrintf (" %d calls to cufinufft.mw:156 (cufinufft.mw:159 )\n " , mexprofrecord_[3 ]);
2362
- mexPrintf (" %d calls to cufinufft.mw:158 \n " , mexprofrecord_[4 ]);
2363
- mexPrintf (" %d calls to cufinufft.mw:170 \n " , mexprofrecord_[6 ]);
2364
- mexPrintf (" %d calls to cufinufft.mw:173 \n " , mexprofrecord_[7 ]);
2365
- mexPrintf (" %d calls to cufinufft.mw:176 \n " , mexprofrecord_[8 ]);
2366
- mexPrintf (" %d calls to cufinufft.mw:178 \n " , mexprofrecord_[9 ]);
2367
- mexPrintf (" %d calls to cufinufft.mw:208 \n " , mexprofrecord_[10 ]);
2368
- mexPrintf (" %d calls to cufinufft.mw:210 \n " , mexprofrecord_[11 ]);
2369
- mexPrintf (" %d calls to cufinufft.mw:242 \n " , mexprofrecord_[12 ]);
2370
- mexPrintf (" %d calls to cufinufft.mw:244 \n " , mexprofrecord_[13 ]);
2371
- mexPrintf (" %d calls to cufinufft.mw:250 \n " , mexprofrecord_[14 ]);
2372
- mexPrintf (" %d calls to cufinufft.mw:252 \n " , mexprofrecord_[15 ]);
2373
- mexPrintf (" %d calls to cufinufft.mw:256 \n " , mexprofrecord_[16 ]);
2374
- mexPrintf (" %d calls to cufinufft.mw:258 \n " , mexprofrecord_[17 ]);
2375
- mexPrintf (" %d calls to cufinufft.mw:270 \n " , mexprofrecord_[18 ]);
2376
- mexPrintf (" %d calls to cufinufft.mw:272 \n " , mexprofrecord_[19 ]);
2362
+ mexPrintf (" %d calls to cufinufft.mw:156 \n " , mexprofrecord_[1 ]);
2363
+ mexPrintf (" %d calls to cufinufft.mw:158 \n " , mexprofrecord_[2 ]);
2364
+ mexPrintf (" %d calls to cufinufft.mw:159 (cufinufft.mw:162 )\n " , mexprofrecord_[3 ]);
2365
+ mexPrintf (" %d calls to cufinufft.mw:161 \n " , mexprofrecord_[4 ]);
2366
+ mexPrintf (" %d calls to cufinufft.mw:173 \n " , mexprofrecord_[6 ]);
2367
+ mexPrintf (" %d calls to cufinufft.mw:176 \n " , mexprofrecord_[7 ]);
2368
+ mexPrintf (" %d calls to cufinufft.mw:179 \n " , mexprofrecord_[8 ]);
2369
+ mexPrintf (" %d calls to cufinufft.mw:181 \n " , mexprofrecord_[9 ]);
2370
+ mexPrintf (" %d calls to cufinufft.mw:211 \n " , mexprofrecord_[10 ]);
2371
+ mexPrintf (" %d calls to cufinufft.mw:213 \n " , mexprofrecord_[11 ]);
2372
+ mexPrintf (" %d calls to cufinufft.mw:245 \n " , mexprofrecord_[12 ]);
2373
+ mexPrintf (" %d calls to cufinufft.mw:247 \n " , mexprofrecord_[13 ]);
2374
+ mexPrintf (" %d calls to cufinufft.mw:253 \n " , mexprofrecord_[14 ]);
2375
+ mexPrintf (" %d calls to cufinufft.mw:255 \n " , mexprofrecord_[15 ]);
2376
+ mexPrintf (" %d calls to cufinufft.mw:259 \n " , mexprofrecord_[16 ]);
2377
+ mexPrintf (" %d calls to cufinufft.mw:261 \n " , mexprofrecord_[17 ]);
2378
+ mexPrintf (" %d calls to cufinufft.mw:273 \n " , mexprofrecord_[18 ]);
2379
+ mexPrintf (" %d calls to cufinufft.mw:275 \n " , mexprofrecord_[19 ]);
2377
2380
} else if (strcmp (id, " *profile log*" ) == 0 ) {
2378
2381
FILE* logfp;
2379
2382
if (nrhs != 2 || mxGetString (prhs[1 ], id, sizeof (id)) != 0 )
@@ -2383,24 +2386,24 @@ void mexFunction(int nlhs, mxArray* plhs[],
2383
2386
mexErrMsgTxt (" Cannot open log for output" );
2384
2387
if (!mexprofrecord_)
2385
2388
fprintf (logfp, " Profiler inactive\n " );
2386
- fprintf (logfp, " %d calls to cufinufft.mw:153 \n " , mexprofrecord_[1 ]);
2387
- fprintf (logfp, " %d calls to cufinufft.mw:155 \n " , mexprofrecord_[2 ]);
2388
- fprintf (logfp, " %d calls to cufinufft.mw:156 (cufinufft.mw:159 )\n " , mexprofrecord_[3 ]);
2389
- fprintf (logfp, " %d calls to cufinufft.mw:158 \n " , mexprofrecord_[4 ]);
2390
- fprintf (logfp, " %d calls to cufinufft.mw:170 \n " , mexprofrecord_[6 ]);
2391
- fprintf (logfp, " %d calls to cufinufft.mw:173 \n " , mexprofrecord_[7 ]);
2392
- fprintf (logfp, " %d calls to cufinufft.mw:176 \n " , mexprofrecord_[8 ]);
2393
- fprintf (logfp, " %d calls to cufinufft.mw:178 \n " , mexprofrecord_[9 ]);
2394
- fprintf (logfp, " %d calls to cufinufft.mw:208 \n " , mexprofrecord_[10 ]);
2395
- fprintf (logfp, " %d calls to cufinufft.mw:210 \n " , mexprofrecord_[11 ]);
2396
- fprintf (logfp, " %d calls to cufinufft.mw:242 \n " , mexprofrecord_[12 ]);
2397
- fprintf (logfp, " %d calls to cufinufft.mw:244 \n " , mexprofrecord_[13 ]);
2398
- fprintf (logfp, " %d calls to cufinufft.mw:250 \n " , mexprofrecord_[14 ]);
2399
- fprintf (logfp, " %d calls to cufinufft.mw:252 \n " , mexprofrecord_[15 ]);
2400
- fprintf (logfp, " %d calls to cufinufft.mw:256 \n " , mexprofrecord_[16 ]);
2401
- fprintf (logfp, " %d calls to cufinufft.mw:258 \n " , mexprofrecord_[17 ]);
2402
- fprintf (logfp, " %d calls to cufinufft.mw:270 \n " , mexprofrecord_[18 ]);
2403
- fprintf (logfp, " %d calls to cufinufft.mw:272 \n " , mexprofrecord_[19 ]);
2389
+ fprintf (logfp, " %d calls to cufinufft.mw:156 \n " , mexprofrecord_[1 ]);
2390
+ fprintf (logfp, " %d calls to cufinufft.mw:158 \n " , mexprofrecord_[2 ]);
2391
+ fprintf (logfp, " %d calls to cufinufft.mw:159 (cufinufft.mw:162 )\n " , mexprofrecord_[3 ]);
2392
+ fprintf (logfp, " %d calls to cufinufft.mw:161 \n " , mexprofrecord_[4 ]);
2393
+ fprintf (logfp, " %d calls to cufinufft.mw:173 \n " , mexprofrecord_[6 ]);
2394
+ fprintf (logfp, " %d calls to cufinufft.mw:176 \n " , mexprofrecord_[7 ]);
2395
+ fprintf (logfp, " %d calls to cufinufft.mw:179 \n " , mexprofrecord_[8 ]);
2396
+ fprintf (logfp, " %d calls to cufinufft.mw:181 \n " , mexprofrecord_[9 ]);
2397
+ fprintf (logfp, " %d calls to cufinufft.mw:211 \n " , mexprofrecord_[10 ]);
2398
+ fprintf (logfp, " %d calls to cufinufft.mw:213 \n " , mexprofrecord_[11 ]);
2399
+ fprintf (logfp, " %d calls to cufinufft.mw:245 \n " , mexprofrecord_[12 ]);
2400
+ fprintf (logfp, " %d calls to cufinufft.mw:247 \n " , mexprofrecord_[13 ]);
2401
+ fprintf (logfp, " %d calls to cufinufft.mw:253 \n " , mexprofrecord_[14 ]);
2402
+ fprintf (logfp, " %d calls to cufinufft.mw:255 \n " , mexprofrecord_[15 ]);
2403
+ fprintf (logfp, " %d calls to cufinufft.mw:259 \n " , mexprofrecord_[16 ]);
2404
+ fprintf (logfp, " %d calls to cufinufft.mw:261 \n " , mexprofrecord_[17 ]);
2405
+ fprintf (logfp, " %d calls to cufinufft.mw:273 \n " , mexprofrecord_[18 ]);
2406
+ fprintf (logfp, " %d calls to cufinufft.mw:275 \n " , mexprofrecord_[19 ]);
2404
2407
fclose (logfp);
2405
2408
} else
2406
2409
mexErrMsgTxt (" Unknown identifier" );
0 commit comments