mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-24 15:59:03 +00:00
Added helper functions for bruteforce step and scale.
This commit is contained in:
@@ -229,6 +229,36 @@ void logFunctionInfo(const char *fname, unsigned int float_size, unsigned int is
|
||||
|
||||
float getAllowedUlpError(const Func *f, const bool relaxed);
|
||||
|
||||
static inline cl_uint setTestScale(size_t typeSize)
|
||||
{
|
||||
if (gWimpyMode)
|
||||
{
|
||||
return (cl_uint)typeSize * 2 * gWimpyReductionFactor;
|
||||
}
|
||||
else if (gIsEmbedded)
|
||||
{
|
||||
return EMBEDDED_REDUCTION_FACTOR;
|
||||
}
|
||||
else
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
static inline uint64_t setTestStep(size_t typeSize, size_t bufferSize)
|
||||
{
|
||||
if (gWimpyMode)
|
||||
{
|
||||
return (1ULL << 32) * gWimpyReductionFactor / (512);
|
||||
}
|
||||
else if (gIsEmbedded)
|
||||
{
|
||||
return (BUFFER_SIZE / typeSize) * EMBEDDED_REDUCTION_FACTOR;
|
||||
}
|
||||
else
|
||||
{
|
||||
return bufferSize / typeSize;
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* UTILITY_H */
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user