Skip to content

Commit

Permalink
Remove using namespace from header in glow/glow/include/glow/Base/S…
Browse files Browse the repository at this point in the history
…liceRange.h +1

Reviewed By: palmje

Differential Revision: D56222659

fbshipit-source-id: 73a288714abce5677a57d415ea29ebd245ba5ddf
  • Loading branch information
r-barnes authored and facebook-github-bot committed Apr 18, 2024
1 parent bc628fb commit f9079b1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
5 changes: 0 additions & 5 deletions include/glow/Base/SliceRange.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,6 @@
#include <unordered_set>
#include <vector>

using namespace glow;
using llvm::cast;
using llvm::dyn_cast;
using llvm::isa;

namespace glow {

/// Dimension range representing a contiguous [start, stop) index interval with
Expand Down
9 changes: 5 additions & 4 deletions tests/unittests/NodeSplittingTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,17 +49,18 @@ TEST(TestSplitNodeOption, CheckLLVMStyleRTTI) {
SplitNodeOption::SplitNodeKind::SplitNodeByChunkWeights);
std::vector<SplitNodeOption *> orthogonalOpts = {&opt1, &opt2, &opt3, &opt4};
for (auto opt : orthogonalOpts) {
EXPECT_NE(nullptr, dyn_cast<SplitNodeOptionOrthogonal>(opt));
EXPECT_EQ(nullptr, dyn_cast<SplitNodeBySliceRanges>(opt));
EXPECT_NE(nullptr, llvm::dyn_cast<SplitNodeOptionOrthogonal>(opt));
EXPECT_EQ(nullptr, llvm::dyn_cast<SplitNodeBySliceRanges>(opt));
}
// Check non-orthogonal options.
std::vector<SliceRange> sliceRanges = {SliceRange({{0, 1}})};
auto opt5 = SplitNodeBySliceRanges(sliceRanges);
EXPECT_EQ(opt5.getKind(),
SplitNodeOption::SplitNodeKind::SplitNodeBySliceRanges);
SplitNodeOption *nonOrthogonalOpt = &opt5;
EXPECT_EQ(nullptr, dyn_cast<SplitNodeOptionOrthogonal>(nonOrthogonalOpt));
EXPECT_NE(nullptr, dyn_cast<SplitNodeBySliceRanges>(nonOrthogonalOpt));
EXPECT_EQ(nullptr,
llvm::dyn_cast<SplitNodeOptionOrthogonal>(nonOrthogonalOpt));
EXPECT_NE(nullptr, llvm::dyn_cast<SplitNodeBySliceRanges>(nonOrthogonalOpt));
}

/// Test for SplitNodeByNumChunks option.
Expand Down

0 comments on commit f9079b1

Please sign in to comment.