Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Complex numbers vals_c #3056

Merged
merged 11 commits into from
Aug 13, 2021
Merged

Conversation

nickdidio
Copy link
Contributor

Submission Checklist

  • Run unit tests: ./runTests.py src/test/unit
  • Run cpplint: make cpplint
  • Declare copyright holder and open-source license: see below

Summary

Allow for intake of complex numbers in Stan. This PR mainly adds a new function called vals_c which allow for intake of complex numbers in a Stan program.

Documentation

All documentation for complex numbers is available at stan-dev/docs#378.

How to Verify

Testing is available in src/test/unit/io/array_var_context_test.cpp

Side Effects

None

Copyright and Licensing

Please list the copyright holder for the work you are submitting (this will be you or your assignee, such as a university or company): Nicholas DiDio

By submitting this pull request, the copyright holder is agreeing to license the submitted work under the following licenses:

@stan-buildbot
Copy link
Contributor


Name Old Result New Result Ratio Performance change( 1 - new / old )
gp_pois_regr/gp_pois_regr.stan 3.01 3.01 1.0 0.23% faster
low_dim_corr_gauss/low_dim_corr_gauss.stan 0.02 0.02 1.0 -0.47% slower
eight_schools/eight_schools.stan 0.1 0.1 0.99 -0.63% slower
gp_regr/gp_regr.stan 0.16 0.16 0.98 -2.39% slower
irt_2pl/irt_2pl.stan 5.84 5.96 0.98 -2.07% slower
performance.compilation 89.81 87.66 1.02 2.4% faster
low_dim_gauss_mix_collapse/low_dim_gauss_mix_collapse.stan 8.54 8.63 0.99 -0.99% slower
pkpd/one_comp_mm_elim_abs.stan 32.19 29.57 1.09 8.14% faster
sir/sir.stan 128.93 125.97 1.02 2.29% faster
gp_regr/gen_gp_data.stan 0.03 0.03 1.0 -0.48% slower
low_dim_gauss_mix/low_dim_gauss_mix.stan 2.98 2.96 1.01 0.71% faster
pkpd/sim_one_comp_mm_elim_abs.stan 0.4 0.39 1.03 2.48% faster
arK/arK.stan 1.92 2.52 0.76 -31.56% slower
arma/arma.stan 0.83 0.91 0.91 -9.46% slower
garch/garch.stan 0.53 0.61 0.87 -15.32% slower
Mean result: 0.97621803717

Jenkins Console Log
Blue Ocean
Commit hash: 5a18ead


Machine information ProductName: Mac OS X ProductVersion: 10.11.6 BuildVersion: 15G22010

CPU:
Intel(R) Xeon(R) CPU E5-1680 v2 @ 3.00GHz

G++:
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 7.0.2 (clang-700.1.81)
Target: x86_64-apple-darwin15.6.0
Thread model: posix

Clang:
Apple LLVM version 7.0.2 (clang-700.1.81)
Target: x86_64-apple-darwin15.6.0
Thread model: posix

Copy link
Contributor

@bob-carpenter bob-carpenter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. This can be merged when tests pass.

@bob-carpenter bob-carpenter merged commit 9cc96c7 into stan-dev:develop Aug 13, 2021
hsbadr added a commit to stan-dev/rstan that referenced this pull request Aug 15, 2021
hsbadr added a commit to stan-dev/rstan that referenced this pull request Aug 15, 2021
hsbadr added a commit to stan-dev/rstan that referenced this pull request Aug 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants