Added test case for cuda_kernel and cuda_device callee types in callee_type filter (#263)

This commit is contained in:
Bartek Kryza
2024-05-01 19:01:25 +02:00
parent 67363013fe
commit b574a41a64
12 changed files with 173 additions and 2 deletions

View File

@@ -106,6 +106,10 @@ std::string to_string(callee_type mt)
return "function_template";
case callee_type::lambda:
return "lambda";
case callee_type::cuda_kernel:
return "cuda_kernel";
case callee_type::cuda_device:
return "cuda_device";
}
assert(false);

View File

@@ -78,7 +78,9 @@ enum class callee_type {
method,
function,
function_template,
lambda
lambda,
cuda_kernel,
cuda_device
};
std::string to_string(callee_type mt);

View File

@@ -112,6 +112,8 @@ types:
- function
- function_template
- lambda
- cuda_kernel
- cuda_device
context_filter_match_t:
match:
radius: int

View File

@@ -312,6 +312,10 @@ template <> struct convert<callee_type> {
rhs = callee_type::method;
else if (val == to_string(callee_type::lambda))
rhs = callee_type::lambda;
else if (val == to_string(callee_type::cuda_kernel))
rhs = callee_type::cuda_kernel;
else if (val == to_string(callee_type::cuda_device))
rhs = callee_type::cuda_device;
else
return false;