0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-07-03 01:09:05 +02:00

ircd:🆑 Add conf item for queue profiling flag.

This commit is contained in:
Jason Volk 2021-03-20 13:41:25 -07:00
parent 000102cf4e
commit 54c1be6ec3
2 changed files with 10 additions and 1 deletions

View file

@ -29,6 +29,7 @@ namespace ircd::cl
extern const info::versions version_api;
extern info::versions version_abi;
extern conf::item<bool> profile_queue;
extern conf::item<bool> enable;
extern log::log log;

View file

@ -87,6 +87,14 @@ ircd::cl::enable
{ "persist", false },
};
decltype(ircd::cl::profile_queue)
ircd::cl::profile_queue
{
{ "name", "ircd.cl.profile.queue" },
{ "default", false },
{ "persist", false },
};
//
// init
//
@ -181,7 +189,7 @@ ircd::cl::init::init()
// Create a queue for each device.
cl_command_queue_properties qprop {0};
qprop |= CL_QUEUE_PROFILING_ENABLE;
qprop |= (profile_queue? CL_QUEUE_PROFILING_ENABLE: 0);
for(size_t i(0); i < platforms; ++i)
for(size_t j(0); j < devices[i]; ++j)
{