Skip to content

Commit

Permalink
added udf for generic type in polynomials benchmark
Browse files Browse the repository at this point in the history
  • Loading branch information
lamarrr committed Jan 8, 2025
1 parent 866979e commit 0de2903
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions cpp/benchmarks/transform/polynomials.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,13 @@ static void BM_transform_polynomials(nvbench::state& state)
expr = "( " + expr + " ) * x + " + std::to_string(constants[i + 1]);
}

static_assert(std::is_same_v<key_type, float> || std::is_same_v<key_type, double>);
std::string type = std::is_same_v<key_type, float> ? "float" : "double";

std::string udf = R"***(
__device__ inline void fdsf (
float* out,
float x
)***" + type + R"***(* out,
)***" + type + R"***( x
)
{
*out = )***" + expr +
Expand Down

0 comments on commit 0de2903

Please sign in to comment.