-
Notifications
You must be signed in to change notification settings - Fork 224
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/repo-refactor' into feat/repo-re…
…factor-cpp17
- Loading branch information
Showing
33 changed files
with
262 additions
and
139 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule fmt
updated
70 files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
lib/utils/include/utils/containers.decl → lib/utils/include/utils/containers.decl.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#ifndef _FLEXFLOW_UTILS_INCLUDE_EXCEPTION_DECL_H | ||
#define _FLEXFLOW_UTILS_INCLUDE_EXCEPTION_DECL_H | ||
|
||
#include "utils/fmt.decl.h" | ||
#include <stdexcept> | ||
|
||
namespace FlexFlow { | ||
|
||
#ifdef FF_REQUIRE_IMPLEMENTED | ||
#define NOT_IMPLEMENTED() static_assert(false, "Function not yet implemented"); | ||
#else | ||
#define NOT_IMPLEMENTED() throw not_implemented(); | ||
#endif | ||
|
||
class not_implemented : public std::logic_error { | ||
public: | ||
not_implemented(); | ||
}; | ||
|
||
template <typename... T> | ||
std::runtime_error mk_runtime_error(fmt::format_string<T...> fmt_str, | ||
T &&...args); | ||
} // namespace FlexFlow | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#ifndef _FLEXFLOW_UTILS_INCLUDE_UTILS_FMT_DECL_H | ||
#define _FLEXFLOW_UTILS_INCLUDE_UTILS_FMT_DECL_H | ||
|
||
#include "fmt/format.h" | ||
#include <unordered_set> | ||
#include <vector> | ||
|
||
namespace FlexFlow { | ||
|
||
template <typename T> | ||
using is_fmtable = ::fmt::is_formattable<T>; | ||
|
||
template <typename T, typename Enable = void> | ||
struct already_has_ostream_operator; | ||
|
||
template <typename T> | ||
typename std::enable_if<!already_has_ostream_operator<T>::value, | ||
std::ostream &>::type | ||
operator<<(std::ostream &s, T const &t); | ||
|
||
} // namespace FlexFlow | ||
|
||
namespace fmt { | ||
|
||
template <typename T> | ||
struct formatter<::std::unordered_set<T>> : formatter<::std::string> { | ||
template <typename FormatContext> | ||
auto format(::std::unordered_set<T> const &m, FormatContext &ctx) | ||
-> decltype(ctx.out()); | ||
}; | ||
|
||
template <typename T> | ||
struct formatter<::std::vector<T>> : formatter<::std::string> { | ||
template <typename FormatContext> | ||
auto format(::std::vector<T> const &m, FormatContext &ctx) | ||
-> decltype(ctx.out()); | ||
}; | ||
|
||
} // namespace fmt | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.