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

Reorganize files after flatten #1678

Merged
merged 2 commits into from
Feb 6, 2020

Conversation

mcol
Copy link
Contributor

@mcol mcol commented Feb 5, 2020

Summary

This performs the following moves:

  • get, size, size_mvt, max_size, max_size_mvt from prim/meta to prim/fun.
  • common_type from prim/fun to prim/meta

Tests

No new tests. The tests files for the above functions have been moved too. There were two size_test files, and they have been merged. Fixes #1513.

Side Effects

People will have to learn to include stan/math/prim/fun/size.hpp and similar, rather than relying on the meta.hpp include.

Checklist

  • Math issue Reorganize files after flattening #1513

  • Copyright holder: Marco Colombo

    The copyright holder is typically you or your assignee, such as a university or company. By submitting this pull request, the copyright holder is agreeing to the license the submitted work under the following licenses:
    - Code: BSD 3-clause (https://opensource.org/licenses/BSD-3-Clause)
    - Documentation: CC-BY 4.0 (https://creativecommons.org/licenses/by/4.0/)

  • the basic tests are passing

    • unit tests pass (to run, use: ./runTests.py test/unit)
    • header checks pass, (make test-headers)
    • dependencies checks pass, (make test-math-dependencies)
    • docs build, (make doxygen)
    • code passes the built in C++ standards checks (make cpplint)
  • the code is written in idiomatic C++ and changes are documented in the doxygen

  • the new changes are tested

@rok-cesnovar rok-cesnovar self-requested a review February 5, 2020 17:55
@rok-cesnovar
Copy link
Member

Thanks @mcol for taking this on. I will have a look soon.

@stan-buildbot
Copy link
Contributor


Name Old Result New Result Ratio Performance change( 1 - new / old )
gp_pois_regr/gp_pois_regr.stan 4.86 4.91 0.99 -1.12% slower
low_dim_corr_gauss/low_dim_corr_gauss.stan 0.02 0.02 0.99 -1.35% slower
eight_schools/eight_schools.stan 0.09 0.09 1.04 4.05% faster
gp_regr/gp_regr.stan 0.22 0.22 0.98 -1.75% slower
irt_2pl/irt_2pl.stan 6.08 6.06 1.0 0.47% faster
performance.compilation 88.3 87.08 1.01 1.38% faster
low_dim_gauss_mix_collapse/low_dim_gauss_mix_collapse.stan 7.3 7.3 1.0 0.03% faster
pkpd/one_comp_mm_elim_abs.stan 21.65 21.64 1.0 0.04% faster
sir/sir.stan 94.99 90.36 1.05 4.87% faster
gp_regr/gen_gp_data.stan 0.04 0.04 1.0 -0.2% slower
low_dim_gauss_mix/low_dim_gauss_mix.stan 2.99 3.0 1.0 -0.3% slower
pkpd/sim_one_comp_mm_elim_abs.stan 0.31 0.3 1.03 2.63% faster
arK/arK.stan 1.75 1.75 1.0 0.03% faster
arma/arma.stan 0.8 0.8 0.99 -0.69% slower
garch/garch.stan 0.63 0.63 1.0 0.38% faster
Mean result: 1.00603886987

Jenkins Console Log
Blue Ocean
Commit hash: bd65d1a


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
Member

@rok-cesnovar rok-cesnovar left a comment

Choose a reason for hiding this comment

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

Thanks @mcol! This looks great. This moves us much further towards the goal of our /meta folder actually contain only template metaprograms.

I do have to give a heads up to @bob-carpenter
Upon merging with the latest develop please note that size() is no longer in /meta and you will need to add #include <stan/math/prim/fun/size.hpp> wherever you need it.

@rok-cesnovar rok-cesnovar merged commit 044cbcb into develop Feb 6, 2020
@rok-cesnovar rok-cesnovar deleted the cleanup/1513-file-reorg-after-flatten branch February 6, 2020 10:40
@bob-carpenter
Copy link
Contributor

bob-carpenter commented Feb 7, 2020 via email

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.

Reorganize files after flattening
4 participants