Skip to content

Commit

Permalink
Minor sync. No change in functionality.
Browse files Browse the repository at this point in the history
  • Loading branch information
delesley committed Oct 31, 2017
1 parent 681aee5 commit 0e7ca14
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
5 changes: 2 additions & 3 deletions tensorflow_fold/llgtm/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ load(
"if_cuda",
)


package(
default_visibility = [
"//tensorflow_fold/llgtm:__subpackages__",
Expand Down Expand Up @@ -291,9 +290,9 @@ test_suite(
name = "cpu_tests",
tests = [
"evaluator_test_eigen",
# "evaluator_test_tf", # disabled due to tf visibility
# "evaluator_test_tf", # disabled due to tf visibility
"gradients_test_eigen",
# "gradients_test_tf", # disabled due to tf visibility
# "gradients_test_tf", # disabled due to tf visibility
"graph_nocompile_test",
"graph_test",
],
Expand Down
19 changes: 12 additions & 7 deletions tensorflow_fold/llgtm/platform/external.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ struct FlagType<double> { using type = float; };

// The following macros provide a convenient mechanism for declaring,
// parsing, and using command line flags. See examples for usage.
// The macros are the public interface; the classes are private.
#define BEGIN_COMMAND_LINE_FLAGS \
llgtm::platform::CommandLineFlagRegistry global_commandline_flag_registry

Expand All @@ -62,6 +63,7 @@ struct FlagType<double> { using type = float; };
global_commandline_flag_registry.Parse(&ARGC, ARGV)


namespace { //
class CommandLineFlagRegistry;

// Base class for command line flags.
Expand Down Expand Up @@ -95,9 +97,9 @@ class CommandLineFlagBase {
template<class T>
class CommandLineFlag : CommandLineFlagBase {
public:
inline CommandLineFlag(const char* name, const char* type,
const char* valstr, const char* docstr,
T default_value, CommandLineFlagRegistry* registry);
CommandLineFlag(const char* name, const char* type,
const char* valstr, const char* docstr,
T default_value, CommandLineFlagRegistry* registry);

const T& value() const { return value_; }

Expand Down Expand Up @@ -144,13 +146,16 @@ class CommandLineFlagRegistry {


template<class T>
CommandLineFlag<T>::CommandLineFlag(const char* name, const char* type,
const char* valstr, const char* docstr,
T default_value,
CommandLineFlagRegistry* registry)
inline CommandLineFlag<T>::CommandLineFlag(const char* name,
const char* type,
const char* valstr,
const char* docstr,
T default_value,
CommandLineFlagRegistry* registry)
: CommandLineFlagBase(name, type, valstr, docstr), value_(default_value) {
registry->Register(this);
}
} // namespace

} // namespace platform
} // namespace llgtm
Expand Down

0 comments on commit 0e7ca14

Please sign in to comment.