Changeset bbfad0a in sasview for realSpaceModeling/pointsmodelpy/pointsmodelpymodule
- Timestamp:
- Mar 6, 2008 8:27:48 AM (17 years ago)
- Branches:
- master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- 914caf52
- Parents:
- c510183
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
realSpaceModeling/pointsmodelpy/pointsmodelpymodule/misc.cc
r41e8114 rbbfad0a 274 274 LORESModel * thislores = static_cast<LORESModel *>(temp); 275 275 276 Py_BEGIN_ALLOW_THREADS 276 277 vector<Point3D> * thisvec = static_cast<vector<Point3D> *>(temp2); 277 278 thislores->DistDistributionXY(*thisvec); 278 279 Py_END_ALLOW_THREADS 280 279 281 return Py_BuildValue("i", 0); 280 282 } … … 314 316 vector<Point3D> * thisvec = static_cast<vector<Point3D> *>(temp2); 315 317 318 Py_BEGIN_ALLOW_THREADS 316 319 PDBModel * thispdb = static_cast<PDBModel *>(temp); 317 320 thispdb->DistDistribution(*thisvec); 318 321 Py_END_ALLOW_THREADS 322 319 323 return Py_BuildValue("i", 0); 320 324 } … … 335 339 336 340 ComplexModel * thiscomplex = static_cast<ComplexModel *>(temp); 341 Py_BEGIN_ALLOW_THREADS 337 342 thiscomplex->DistDistribution(*thisvec); 338 343 Py_END_ALLOW_THREADS 339 344 return Py_BuildValue("i", 0); 340 345 } … … 356 361 IQ * thisiq = static_cast<IQ *>(temp2); 357 362 363 Py_BEGIN_ALLOW_THREADS 358 364 thislores->CalculateIQ(thisiq); 359 365 Py_END_ALLOW_THREADS 366 360 367 return Py_BuildValue("i",0); 361 368 } … … 375 382 376 383 LORESModel * thislores = static_cast<LORESModel *>(temp); 377 378 double I = thislores->CalculateIQ(q); 379 384 385 double I = 0.0; 386 Py_BEGIN_ALLOW_THREADS 387 I = thislores->CalculateIQ(q); 388 Py_END_ALLOW_THREADS 389 380 390 return Py_BuildValue("d",I); 381 391 } … … 397 407 LORESModel * thislores = static_cast<LORESModel *>(temp); 398 408 IQ * thisiq = static_cast<IQ *>(temp2); 399 409 410 Py_BEGIN_ALLOW_THREADS 400 411 thislores->CalculateIQ_2D(thisiq,theta); 401 412 Py_END_ALLOW_THREADS 413 402 414 return Py_BuildValue("i",0); 403 415 } … … 418 430 void *temp = PyCObject_AsVoidPtr(pylores); 419 431 LORESModel * thislores = static_cast<LORESModel *>(temp); 420 432 433 Py_BEGIN_ALLOW_THREADS 421 434 I = thislores->CalculateIQ_2D(qx,qy); 422 435 Py_END_ALLOW_THREADS 436 423 437 return Py_BuildValue("d",I); 424 438 } … … 442 456 vector<Point3D> * thisvec = static_cast<vector<Point3D> *>(temp2); 443 457 458 Py_BEGIN_ALLOW_THREADS 444 459 I = thislores->CalculateIQ_2D(*thisvec, qx,qy); 445 460 Py_END_ALLOW_THREADS 461 446 462 return Py_BuildValue("d",I); 447 463 } … … 463 479 IQ * thisiq = static_cast<IQ *>(temp2); 464 480 481 Py_BEGIN_ALLOW_THREADS 465 482 thispdb->CalculateIQ(thisiq); 466 483 Py_END_ALLOW_THREADS 484 467 485 return Py_BuildValue("i",0); 468 486 } … … 484 502 PDBModel * thispdb = static_cast<PDBModel *>(temp); 485 503 504 Py_BEGIN_ALLOW_THREADS 486 505 I = thispdb->CalculateIQ_2D(qx,qy); 487 506 Py_END_ALLOW_THREADS 507 488 508 return Py_BuildValue("d",I); 489 509 } … … 507 527 vector<Point3D> * thisvec = static_cast<vector<Point3D> *>(temp2); 508 528 529 Py_BEGIN_ALLOW_THREADS 509 530 I = thispdb->CalculateIQ_2D(*thisvec,qx,qy); 510 531 Py_END_ALLOW_THREADS 532 511 533 return Py_BuildValue("d",I); 512 534 } … … 528 550 IQ * thisiq = static_cast<IQ *>(temp2); 529 551 552 Py_BEGIN_ALLOW_THREADS 530 553 thiscomplex->CalculateIQ(thisiq); 531 554 Py_END_ALLOW_THREADS 555 532 556 return Py_BuildValue("i",0); 533 557 } … … 549 573 vector<Point3D> * thisvec = static_cast<vector<Point3D> *>(temp2); 550 574 551 double I = thiscomplex->CalculateIQ_2D(*thisvec,qx,qy); 552 575 double I = 0.0; 576 Py_BEGIN_ALLOW_THREADS 577 I = thiscomplex->CalculateIQ_2D(*thisvec,qx,qy); 578 Py_END_ALLOW_THREADS 579 553 580 return Py_BuildValue("d",I); 554 581 } … … 570 597 vector<Point3D> * thisvec = static_cast<vector<Point3D> *>(temp2); 571 598 572 double I = thiscomplex->CalculateIQ_2D_Error(*thisvec,qx,qy); 573 599 double I = 0.0; 600 Py_BEGIN_ALLOW_THREADS 601 I = thiscomplex->CalculateIQ_2D_Error(*thisvec,qx,qy); 602 Py_END_ALLOW_THREADS 603 574 604 return Py_BuildValue("d",I); 575 605 } … … 589 619 590 620 ComplexModel * thiscomplex = static_cast<ComplexModel *>(temp); 591 592 double I = thiscomplex->CalculateIQ(q); 593 621 622 double I = 0.0; 623 Py_BEGIN_ALLOW_THREADS 624 I = thiscomplex->CalculateIQ(q); 625 Py_END_ALLOW_THREADS 626 594 627 return Py_BuildValue("d",I); 595 628 } … … 609 642 ComplexModel * thiscomplex = static_cast<ComplexModel *>(temp); 610 643 611 double I = thiscomplex->CalculateIQError(q); 612 644 double I = 0.0; 645 Py_BEGIN_ALLOW_THREADS 646 I = thiscomplex->CalculateIQError(q); 647 Py_END_ALLOW_THREADS 648 613 649 return Py_BuildValue("d",I); 614 650 }
Note: See TracChangeset
for help on using the changeset viewer.