mirror of
https://gitlab.kitware.com/vtk/vtk-m
synced 2024-09-16 17:22:55 +00:00
Remove unused functor from function interface test.
It was the functor that was used to test the time overhead of invoking a functor through a FunctionInterface, but that test has been disabled.
This commit is contained in:
parent
72c62a3556
commit
eae8921dc7
@ -27,6 +27,11 @@
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
|
||||
// Disable the test on the overhead to invoke a function. It is unreliable and
|
||||
// the most critical invoke (for the instance of a worklet) does not directly
|
||||
// use the Invoke method.
|
||||
#define TEST_INVOKE_TIME
|
||||
|
||||
namespace {
|
||||
|
||||
typedef vtkm::Id Type1;
|
||||
@ -148,6 +153,7 @@ struct FiveArgSwizzledFunctor {
|
||||
}
|
||||
};
|
||||
|
||||
#ifdef TEST_INVOKE_TIME
|
||||
struct LotsOfArgsFunctor {
|
||||
LotsOfArgsFunctor() : Field(0) { }
|
||||
|
||||
@ -177,6 +183,7 @@ struct LotsOfArgsFunctor {
|
||||
}
|
||||
vtkm::FloatDefault Field;
|
||||
};
|
||||
#endif //TEST_INVOKE_TIME
|
||||
|
||||
template<typename T>
|
||||
std::string ToString(const T &value)
|
||||
@ -474,7 +481,7 @@ void TestZip()
|
||||
InvokeCont(ZipFunctor());
|
||||
}
|
||||
|
||||
#if 0
|
||||
#ifdef TEST_INVOKE_TIME
|
||||
void TestInvokeTime()
|
||||
{
|
||||
std::cout << "Checking time to call lots of args lots of times." << std::endl;
|
||||
@ -543,7 +550,7 @@ void TestInvokeTime()
|
||||
"Function interface invoke took longer than expected.");
|
||||
#endif
|
||||
}
|
||||
#endif // if 0
|
||||
#endif // if TEST_INVOKE_TIME
|
||||
|
||||
void TestFunctionInterface()
|
||||
{
|
||||
@ -555,10 +562,9 @@ void TestFunctionInterface()
|
||||
TestDynamicTransform();
|
||||
TestForEach();
|
||||
TestZip();
|
||||
// Disable this last test. It is unreliable and the most critical invoke
|
||||
// (for the instance of a worklet) does not directly use the Invoke
|
||||
// method.
|
||||
//TestInvokeTime();
|
||||
#ifdef TEST_INVOKE_TIME
|
||||
TestInvokeTime();
|
||||
#endif //TEST_INVOKE_TIME
|
||||
}
|
||||
|
||||
} // anonymous namespace
|
||||
|
Loading…
Reference in New Issue
Block a user