Skip to content

Commit

Permalink
Rename __CLAD_SO_LOADED to __CLAD__
Browse files Browse the repository at this point in the history
  • Loading branch information
MihailMihov authored and vgvassilev committed Oct 27, 2024
1 parent 6bbef33 commit 9fdea68
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions include/clad/Differentiator/Differentiator.h
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ CUDA_HOST_DEVICE T push(tape<T>& to, ArgsT... val) {
bool CUDAkernel = false)
requires(!ImmediateMode)
: m_Function(f), m_Functor(functor), m_CUDAkernel(CUDAkernel) {
#ifndef __CLAD_SO_LOADED
#ifndef __CLAD__
static_assert(false, "clad doesn't appear to be loaded; make sure that "
"you pass clad.so to clang.");
#endif
Expand All @@ -229,7 +229,7 @@ CUDA_HOST_DEVICE T push(tape<T>& to, ArgsT... val) {
: m_Function(f), m_Code("<constexpr functions don't have support for "
"printing the derivative yet>"),
m_Functor(functor), m_CUDAkernel(CUDAkernel) {
#ifndef __CLAD_SO_LOADED
#ifndef __CLAD__
static_assert(false, "clad doesn't appear to be loaded; make sure that "
"you pass clad.so to clang.");
#endif
Expand All @@ -239,7 +239,7 @@ CUDA_HOST_DEVICE T push(tape<T>& to, ArgsT... val) {
FunctorType* functor = nullptr,
bool CUDAkernel = false)
: m_Function(f), m_Functor(functor), m_CUDAkernel(CUDAkernel) {
#ifndef __CLAD_SO_LOADED
#ifndef __CLAD__
static_assert(false, "clad doesn't appear to be loaded; make sure that "
"you pass clad.so to clang.");
#endif
Expand Down
4 changes: 2 additions & 2 deletions tools/ClangPlugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,10 @@ namespace clad {
}
#endif // CLANG_VERSION_MAJOR > 8

// Add define for __CLAD_SO_LOADED, so that CladFunction::CladFunction()
// Add define for __CLAD__, so that CladFunction::CladFunction()
// doesn't throw an error.
auto predefines = m_CI.getPreprocessor().getPredefines();
predefines.append("#define __CLAD_SO_LOADED 1\n");
predefines.append("#define __CLAD__ 1\n");
m_CI.getPreprocessor().setPredefines(predefines);
}

Expand Down

0 comments on commit 9fdea68

Please sign in to comment.