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

Switch to Using clang-6.0 #113

Merged
merged 1 commit into from
Apr 10, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 15 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,30 +19,36 @@ matrix:
apt:
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-trusty-6.0
- sourceline: 'deb http://apt.llvm.org/trusty/ llvm-toolchain-trusty-6.0 main'
key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key'
packages:
- g++-6
- libc++-dev
- libc++abi-dev
- clang-3.8
- clang-format-3.8
- clang-tidy-3.8
- clang-6.0
- clang-format-6.0
- clang-tidy-6.0
- libnlopt-dev
env:
- C_COMPILER=gcc-6 CXX_COMPILER=g++-6 COVERAGE=''
- compiler: clang-3.8
- C_COMPILER=gcc-6 CXX_COMPILER=g++-6
- compiler: clang-6.0
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-trusty-6.0
- sourceline: 'deb http://apt.llvm.org/trusty/ llvm-toolchain-trusty-6.0 main'
key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key'
packages:
- libc++-dev
- libc++abi-dev
- clang-3.8
- clang-format-3.8
- clang-tidy-3.8
- clang-6.0
- clang-format-6.0
- clang-tidy-6.0
- libnlopt-dev
env:
- C_COMPILER=clang-3.8 CXX_COMPILER=clang++-3.8 COVERAGE=''
- C_COMPILER=clang-6.0 CXX_COMPILER=clang++-6.0
- compiler: sphinx
addons:
apt:
Expand Down
2 changes: 1 addition & 1 deletion cmake/ClangTools.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ endif(CMAKE_CROSSCOMPILING)
set(CLANG_FORMAT_PATH "NOTSET" CACHE STRING "Absolute path to the clang-format executable")
if("${CLANG_FORMAT_PATH}" STREQUAL "NOTSET")
find_program(CLANG_FORMAT NAMES
clang-format-3.8
clang-format-6.0
)
message(STATUS "Using clang format: ${CLANG_FORMAT}")
if("${CLANG_FORMAT}" STREQUAL "CLANG_FORMAT-NOTFOUND")
Expand Down
5 changes: 3 additions & 2 deletions include/albatross/core/parameter_handling_mixin.h
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,9 @@ inline std::string pretty_param_details(const ParameterStore &params) {
<< " prior: " << std::setw(15) << prior_name << " bounds: ["
<< (pair.second.has_prior() ? pair.second.prior->lower_bound()
: -INFINITY)
<< ", " << (pair.second.has_prior() ? pair.second.prior->upper_bound()
: INFINITY)
<< ", "
<< (pair.second.has_prior() ? pair.second.prior->upper_bound()
: INFINITY)
<< "]" << std::endl;
}
return ss.str();
Expand Down
14 changes: 7 additions & 7 deletions include/albatross/core/parameter_macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,37 +96,37 @@
if (_cond(x)) { \
_action(x); \
} else \
_build_if_1(_cond, _action, __VA_ARGS__)
_build_if_1(_cond, _action, __VA_ARGS__)
#define _build_if_3(_cond, _action, x, ...) \
if (_cond(x)) { \
_action(x); \
} else \
_build_if_2(_cond, _action, __VA_ARGS__)
_build_if_2(_cond, _action, __VA_ARGS__)
#define _build_if_4(_cond, _action, x, ...) \
if (_cond(x)) { \
_action(x); \
} else \
_build_if_3(_cond, _action, __VA_ARGS__)
_build_if_3(_cond, _action, __VA_ARGS__)
#define _build_if_5(_cond, _action, x, ...) \
if (_cond(x)) { \
_action(x); \
} else \
_build_if_4(_cond, _action, __VA_ARGS__)
_build_if_4(_cond, _action, __VA_ARGS__)
#define _build_if_6(_cond, _action, x, ...) \
if (_cond(x)) { \
_action(x); \
} else \
_build_if_5(_cond, _action, __VA_ARGS__)
_build_if_5(_cond, _action, __VA_ARGS__)
#define _build_if_7(_cond, _action, x, ...) \
if (_cond(x)) { \
_action(x); \
} else \
_build_if_6(_cond, _action, __VA_ARGS__)
_build_if_6(_cond, _action, __VA_ARGS__)
#define _build_if_8(_cond, _action, x, ...) \
if (_cond(x)) { \
_action(x); \
} else \
_build_if_7(_cond, _action, __VA_ARGS__)
_build_if_7(_cond, _action, __VA_ARGS__)

#define BUILD_IF(cond, action, ...) \
_GET_NTH_ARG("ignored", ##__VA_ARGS__, _build_if_8, _build_if_7, \
Expand Down
2 changes: 1 addition & 1 deletion include/albatross/evaluation/differential_entropy.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,6 @@ inline double differential_entropy(const Eigen::MatrixXd &cov) {
Eigen::LDLT<Eigen::MatrixXd> ldlt(cov);
return differential_entropy(ldlt);
}
}
} // namespace albatross

#endif /* INCLUDE_ALBATROSS_EVALUATION_DIFFERENTIAL_ENTROPY_H_ */
2 changes: 1 addition & 1 deletion include/albatross/evaluation/model_metrics.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,6 @@ struct LeaveOneOutRMSE : public ModelMetric<LeaveOneOutRMSE> {
return rmse_score;
}
};
}
} // namespace albatross

#endif /* ALBATROSS_EVALUATION_MODEL_METRICS_H_ */
2 changes: 1 addition & 1 deletion include/albatross/evaluation/prediction_metrics.h
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,6 @@ struct NegativeLogLikelihood : public PredictionMetric<PredictType> {
NegativeLogLikelihood()
: PredictionMetric<PredictType>(negative_log_likelihood) {}
};
}
} // namespace albatross

#endif /* ALBATROSS_EVALUATION_PREDICTION_METRICS_H_ */
2 changes: 1 addition & 1 deletion include/albatross/models/ransac_gp.h
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,6 @@ struct GaussianProcessRansacStrategy {
using DefaultGPRansacStrategy =
GaussianProcessRansacStrategy<NegativeLogLikelihood<JointDistribution>,
LeaveOneOut>;
}
} // namespace albatross

#endif /* INCLUDE_ALBATROSS_MODELS_RANSAC_GP_H_ */