Skip to content

Commit 8bebfd7

Browse files
committed
Update perf.cc
1 parent 48938c2 commit 8bebfd7

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

perf_test_suite/perf.cc

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,20 @@ struct div_test
171171
}
172172
};
173173

174+
static fixed_t fmod(fixed_t& a, fixed_t& b)
175+
{
176+
return a % b;
177+
}
178+
179+
struct mod_test
180+
{
181+
template<typename value_type>
182+
auto operator()(value_type const & tp)
183+
{
184+
return fmod(tp,tp);
185+
}
186+
};
187+
174188
int main(int argc, char ** argv)
175189
{
176190
cout << test_executor<sin_test>{}("sin") << endl;
@@ -182,6 +196,7 @@ int main(int argc, char ** argv)
182196
cout << test_executor<add_test>{}("add") << endl;
183197
cout << test_executor<mul_test>{}("mul") << endl;
184198
cout << test_executor<div_test>{}("div") << endl;
199+
cout << test_executor<mod_test>{}("mod") << endl;
185200
return EXIT_SUCCESS;
186201
}
187202

0 commit comments

Comments
 (0)