Kaydet (Commit) 41a60940 authored tarafından Tor Lillqvist's avatar Tor Lillqvist

Produce the expected N/A error code in the OpenCL VLOOKUP implementation

Instead of a bare NaN.

Change-Id: I170c540478315eedd23f5851d54c30175d21ef96
üst 5da016f5
...@@ -40,6 +40,7 @@ static const char* publicFunc = ...@@ -40,6 +40,7 @@ static const char* publicFunc =
"#define errIllegalFPOperation 503 // #NUM!\n" "#define errIllegalFPOperation 503 // #NUM!\n"
"#define errNoValue 519 // #VALUE!\n" "#define errNoValue 519 // #VALUE!\n"
"#define errDivisionByZero 532 // #DIV/0!\n" "#define errDivisionByZero 532 // #DIV/0!\n"
"#define NOTAVAILABLE 0x7fff // #N/A\n"
"\n" "\n"
"double CreateDoubleError(ulong nErr)\n" "double CreateDoubleError(ulong nErr)\n"
"{\n" "{\n"
......
...@@ -35,7 +35,7 @@ void OpVLookup::GenSlidingWindowFunction(std::stringstream &ss, ...@@ -35,7 +35,7 @@ void OpVLookup::GenSlidingWindowFunction(std::stringstream &ss,
} }
ss << ")\n {\n"; ss << ")\n {\n";
ss << " int gid0=get_global_id(0);\n"; ss << " int gid0=get_global_id(0);\n";
ss << " double tmp = NAN;\n"; ss << " double tmp = CreateDoubleError(NOTAVAILABLE);\n";
ss << " double intermediate = DBL_MAX;\n"; ss << " double intermediate = DBL_MAX;\n";
ss << " int singleIndex = gid0;\n"; ss << " int singleIndex = gid0;\n";
ss << " int rowNum = -1;\n"; ss << " int rowNum = -1;\n";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment