Igor Gnatenko:
v2: PIPE_COMPUTE_CAP_MAX_CLOCK_FREQUENCY instead of
PIPE_COMPUTE_MAX_CLOCK_FREQUENCY
Bruno Jiménez:
v3: Drivers report clock in Mhz
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
break;
case CL_DEVICE_MAX_CLOCK_FREQUENCY:
- buf.as_scalar<cl_uint>() = 0;
+ buf.as_scalar<cl_uint>() = dev.max_clock_frequency();
break;
case CL_DEVICE_ADDRESS_BITS:
PIPE_COMPUTE_CAP_MAX_MEM_ALLOC_SIZE)[0];
}
+cl_uint
+device::max_clock_frequency() const {
+ return get_compute_param<uint32_t>(pipe,
+ PIPE_COMPUTE_CAP_MAX_CLOCK_FREQUENCY)[0];
+}
+
std::vector<size_t>
device::max_block_size() const {
auto v = get_compute_param<uint64_t>(pipe, PIPE_COMPUTE_CAP_MAX_BLOCK_SIZE);
cl_uint max_const_buffers() const;
size_t max_threads_per_block() const;
cl_ulong max_mem_alloc_size() const;
+ cl_uint max_clock_frequency() const;
std::vector<size_t> max_block_size() const;
std::string device_name() const;