MCPcopy Create free account
hub / github.com/ROCm/AMDMIGraphX / shuffle_module

Function shuffle_module

test/module_test.cpp:56–66  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

54}
55
56static void shuffle_module(migraphx::module& m)
57{
58 if(m.size() < 2)
59 return;
60 std::vector<std::size_t> permutation(m.size() - 1);
61 std::iota(permutation.begin(), permutation.end(), 0);
62 std::mt19937 g(permutation.size());
63 std::shuffle(permutation.begin(), permutation.end(), g);
64 permutation.push_back(permutation.size());
65 m.shuffle(permutation);
66}
67
68static void reverse_module(migraphx::module& m)
69{

Callers 1

TEST_CASEFunction · 0.85

Calls 5

iotaFunction · 0.85
sizeMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected