Permalink
Browse files

Merge pull request #1223 from loriab/clangf_headers

fmt: clang-format the code in psi4/include (take 2)
  • Loading branch information...
loriab committed Sep 7, 2018
2 parents 0b8e988 + 609202e commit b8a446aec6293659c2c6b2fc0e6ceab8da8cf46e
Showing with 346 additions and 345 deletions.
  1. +13 −11 psi4/include/psi4/pragma.h
  2. +11 −11 psi4/include/psi4/psi4-dec.h
  3. +320 −319 psi4/include/psi4/psifiles.h
  4. +1 −1 psi4/include/psi4/pybind11.h
  5. +1 −3 psi4/include/psi4/times.h
View
@@ -26,11 +26,12 @@
* @END LICENSE
*/
///File is stolen from pulsar all thanks to bennyp
/// File is stolen from pulsar all thanks to bennyp
#ifndef PULSAR_GUARD_PULSAR__PRAGMA_H_
#define PULSAR_GUARD_PULSAR__PRAGMA_H_
// clang-format off
#if defined(__ICC) || defined(__INTEL_COMPILER)
// pragmas for Intel
@@ -56,7 +57,7 @@
#define PRAGMA_WARNING_IGNORE_DEPRECATED_DECLARATIONS _Pragma("warning(disable:1478)")
#define PRAGMA_WARNING_IGNORE_OVERLOADED_VIRTUAL
#elif defined(__clang__) // Do clang before GNU because clang defines __GNUC__, too.
#elif defined(__clang__) // Do clang before GNU because clang defines __GNUC__, too.
#define PRAGMA_WARNING_PUSH _Pragma("clang diagnostic push")
#define PRAGMA_WARNING_POP _Pragma("clang diagnostic pop")
@@ -131,20 +132,21 @@
#define PRAGMA_WARNING_IGNORE_OVERLOADED_VIRTUAL
#endif
// clang-format on
// The following is adapted from https://gcc.gnu.org/wiki/Visibility the step-by-step guide at the very bottom
// Visibility macros
#if defined _WIN32 || defined __CYGWIN__
# define PSI_HELPER_SO_EXPORT __declspec(dllexport)
# define PSI_HELPER_SO_LOCAL
#define PSI_HELPER_SO_EXPORT __declspec(dllexport)
#define PSI_HELPER_SO_LOCAL
#else
# if __GNUC__ >= 4
# define PSI_HELPER_SO_EXPORT __attribute__ ((visibility ("default")))
# define PSI_HELPER_SO_LOCAL __attribute__ ((visibility ("hidden")))
# else
# define PSI_HELPER_SO_EXPORT
# define PSI_HELPER_SO_LOCAL
# endif
#if __GNUC__ >= 4
#define PSI_HELPER_SO_EXPORT __attribute__((visibility("default")))
#define PSI_HELPER_SO_LOCAL __attribute__((visibility("hidden")))
#else
#define PSI_HELPER_SO_EXPORT
#define PSI_HELPER_SO_LOCAL
#endif
#endif
// Use generic helper definitions to define PSI_API and PSI_LOCAL
@@ -33,22 +33,22 @@
#include <string>
#include <memory>
///This is all defined in python.cc initialize
/// This is all defined in python.cc initialize
namespace psi {
class PsiOutStream;
extern PSI_API std::shared_ptr<PsiOutStream> outfile;
extern std::string outfile_name;
class PsiOutStream;
extern PSI_API std::shared_ptr<PsiOutStream> outfile;
extern std::string outfile_name;
extern char *psi_file_prefix;
extern std::string restart_id; // Does not have a default
extern char *psi_file_prefix;
extern std::string restart_id; // Does not have a default
enum PsiReturnType {Success, Failure, Balk, EndLoop};
enum PsiReturnType { Success, Failure, Balk, EndLoop };
// Very useful regex for matching floating point numbers
#define NUMBER "((?:[-+]?\\d*\\.\\d+(?:[DdEe][-+]?\\d+)?)|(?:[-+]?\\d+\\.\\d*(?:[DdEe][-+]?\\d+)?))"
// Very useful regex for matching floating point numbers
#define NUMBER "((?:[-+]?\\d*\\.\\d+(?:[DdEe][-+]?\\d+)?)|(?:[-+]?\\d+\\.\\d*(?:[DdEe][-+]?\\d+)?))"
void die_if_not_converged();
void die_if_not_converged();
}//End namespace psi
} // End namespace psi
#endif
Oops, something went wrong.

0 comments on commit b8a446a

Please sign in to comment.