| 30 | } |
| 31 | |
| 32 | bool device_program::should_ignore_function_for_device(const device& dev, const toolchain::function_info& func_info) const { |
| 33 | if (func_info.has_valid_required_simd_width()) { |
| 34 | if (func_info.required_simd_width < dev.simd_range.x || |
| 35 | func_info.required_simd_width > dev.simd_range.y) { |
| 36 | #if defined(FLOOR_DEBUG) |
| 37 | log_warn("ignoring function \"$\" that requires an unsupported SIMD width $ for device $ (SIMD range [$, $])", |
| 38 | func_info.name, func_info.required_simd_width, dev.name, dev.simd_range.x, dev.simd_range.y); |
| 39 | #endif |
| 40 | return true; |
| 41 | } |
| 42 | } |
| 43 | if (func_info.has_valid_required_local_size()) { |
| 44 | if (func_info.required_local_size.extent() > dev.max_total_local_size || |
| 45 | (func_info.required_local_size > dev.max_local_size).any()) { |
| 46 | #if defined(FLOOR_DEBUG) |
| 47 | log_warn("ignoring function \"$\" that requires an unsupported local size $ for device $ (max local size $, max total $)", |
| 48 | func_info.name, func_info.required_local_size, dev.name, dev.max_local_size, dev.max_total_local_size); |
| 49 | #endif |
| 50 | return true; |
| 51 | } |
| 52 | } |
| 53 | return false; |
| 54 | } |
| 55 | |
| 56 | } // namespace fl |
nothing calls this directly
no test coverage detected