Skip to content

Commit

Permalink
remove template instantiation in header files
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonRuonanWang committed Mar 30, 2022
1 parent 3699f98 commit 218ff81
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 88 deletions.
42 changes: 0 additions & 42 deletions bindings/CXX11/adios2/cxx11/Engine.h
Original file line number Diff line number Diff line change
Expand Up @@ -458,48 +458,6 @@ class Engine
core::Engine *m_Engine = nullptr;
};

#define declare_template_instantiation(T) \
\
extern template typename Variable<T>::Span Engine::Put( \
Variable<T>, const bool, const T &); \
extern template typename Variable<T>::Span Engine::Put(Variable<T>); \
extern template void Engine::Get(Variable<T>, T **) const;

ADIOS2_FOREACH_PRIMITIVE_TYPE_1ARG(declare_template_instantiation)
#undef declare_template_instantiation

#define declare_template_instantiation(T) \
extern template void Engine::Put<T>(Variable<T>, const T *, const Mode); \
extern template void Engine::Put<T>(const std::string &, const T *, \
const Mode); \
extern template void Engine::Put<T>(Variable<T>, const T &, const Mode); \
extern template void Engine::Put<T>(const std::string &, const T &, \
const Mode); \
\
extern template void Engine::Get<T>(Variable<T>, T *, const Mode); \
extern template void Engine::Get<T>(const std::string &, T *, const Mode); \
extern template void Engine::Get<T>(Variable<T>, T &, const Mode); \
extern template void Engine::Get<T>(const std::string &, T &, const Mode); \
\
extern template void Engine::Get<T>(Variable<T>, std::vector<T> &, \
const Mode); \
extern template void Engine::Get<T>(const std::string &, std::vector<T> &, \
const Mode); \
\
extern template void Engine::Get<T>( \
Variable<T>, typename Variable<T>::Info & info, const Mode); \
extern template void Engine::Get<T>( \
const std::string &, typename Variable<T>::Info &info, const Mode); \
\
extern template std::map<size_t, std::vector<typename Variable<T>::Info>> \
Engine::AllStepsBlocksInfo(const Variable<T> variable) const; \
\
extern template std::vector<typename Variable<T>::Info> \
Engine::BlocksInfo(const Variable<T> variable, const size_t step) const;

ADIOS2_FOREACH_TYPE_1ARG(declare_template_instantiation)
#undef declare_template_instantiation

std::string ToString(const Engine &engine);

} // end namespace adios2
Expand Down
6 changes: 0 additions & 6 deletions bindings/CXX11/adios2/cxx11/Group.h
Original file line number Diff line number Diff line change
Expand Up @@ -135,11 +135,5 @@ class Group
*/
DataType AttributeType(const std::string &name) const;
};
// Explicit declaration of the public template methods
// Limits the types
#define declare_template_instantiation(T) \
extern template Variable<T> Group::InquireVariable<T>(const std::string &);
ADIOS2_FOREACH_TYPE_1ARG(declare_template_instantiation)
#undef declare_template_instantiation
}
#endif // ADIOS2_BINDINGS_CXX11_CXX11_GROUP_H_
26 changes: 0 additions & 26 deletions bindings/CXX11/adios2/cxx11/IO.h
Original file line number Diff line number Diff line change
Expand Up @@ -364,32 +364,6 @@ class IO
core::IO *m_IO = nullptr;
};

// Explicit declaration of the public template methods
// Limits the types
#define declare_template_instantiation(T) \
extern template Variable<T> IO::DefineVariable(const std::string &, \
const Dims &, const Dims &, \
const Dims &, const bool); \
\
extern template Variable<T> IO::InquireVariable<T>(const std::string &);

ADIOS2_FOREACH_TYPE_1ARG(declare_template_instantiation)
#undef declare_template_instantiation

#define declare_template_instantiation(T) \
extern template Attribute<T> IO::DefineAttribute( \
const std::string &, const T *, const size_t, const std::string &, \
const std::string, const bool); \
\
extern template Attribute<T> IO::DefineAttribute( \
const std::string &, const T &, const std::string &, \
const std::string, const bool); \
\
extern template Attribute<T> IO::InquireAttribute<T>( \
const std::string &, const std::string &, const std::string);
ADIOS2_FOREACH_ATTRIBUTE_TYPE_1ARG(declare_template_instantiation)
#undef declare_template_instantiation

std::string ToString(const IO &io);

} // end namespace adios2
Expand Down
8 changes: 0 additions & 8 deletions bindings/CXX11/adios2/cxx11/Types.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,5 @@ namespace adios2
template <class T>
std::string GetType() noexcept;

// LIMIT TEMPLATE TYPES FOR adios2::GetType
#define declare_template_instantiation(T) \
\
extern template std::string GetType<T>() noexcept;

ADIOS2_FOREACH_TYPE_1ARG(declare_template_instantiation)
#undef declare_template_instantiation

} // end namespace adios2
#endif /* ADIOS2_BINDINGS_CXX11_TYPES_H_ */
6 changes: 0 additions & 6 deletions bindings/CXX11/adios2/cxx11/Variable.h
Original file line number Diff line number Diff line change
Expand Up @@ -397,12 +397,6 @@ class Variable
DoAllStepsBlocksInfoMap() const;
};

#define declare_template_instantiation(T) \
extern template std::vector<typename Variable<T>::Info> \
Variable<T>::ToBlocksInfoMin(const MinVarInfo *coreVarInfo) const;
ADIOS2_FOREACH_TYPE_1ARG(declare_template_instantiation)
#undef declare_template_instantiation

template <typename T>
std::string ToString(const Variable<T> &variable);

Expand Down

0 comments on commit 218ff81

Please sign in to comment.