mirror of
https://github.com/matrix-construct/construct
synced 2024-12-26 07:23:53 +01:00
ircd:🆑 Remove the host ptr conf item for now.
This commit is contained in:
parent
b3d2c95474
commit
aba8b6813e
2 changed files with 6 additions and 19 deletions
|
@ -14,7 +14,6 @@
|
|||
/// cl_mem wrapping
|
||||
struct ircd::cl::data
|
||||
{
|
||||
static conf::item<bool> use_host_ptr;
|
||||
static conf::item<size_t> gart_page_size;
|
||||
|
||||
void *handle {nullptr};
|
||||
|
|
24
ircd/cl.cc
24
ircd/cl.cc
|
@ -2126,14 +2126,6 @@ ircd::cl::build_handle_error_log_line(const string_view &line)
|
|||
// data
|
||||
//
|
||||
|
||||
decltype(ircd::cl::data::use_host_ptr)
|
||||
ircd::cl::data::use_host_ptr
|
||||
{
|
||||
{ "name", "ircd.cl.data.use_host_ptr" },
|
||||
{ "default", false },
|
||||
{ "help", "Non-buggy platforms can try `true`." },
|
||||
};
|
||||
|
||||
decltype(ircd::cl::data::gart_page_size)
|
||||
ircd::cl::data::gart_page_size
|
||||
{
|
||||
|
@ -2180,17 +2172,15 @@ ircd::cl::data::data(const mutable_buffer &buf,
|
|||
|
||||
const auto &size
|
||||
{
|
||||
ptr?
|
||||
ircd::size(buf):
|
||||
size_t(std::get<1>(buf))
|
||||
ircd::size(buf)
|
||||
};
|
||||
|
||||
if(!size)
|
||||
return;
|
||||
|
||||
cl_mem_flags flags {0};
|
||||
flags |= CL_MEM_USE_HOST_PTR;
|
||||
flags |= wonly? CL_MEM_WRITE_ONLY: CL_MEM_READ_WRITE;
|
||||
flags |= ptr && use_host_ptr? CL_MEM_USE_HOST_PTR: 0;
|
||||
|
||||
assert(!ptr || aligned(buf, size_t(gart_page_size)));
|
||||
assert(padded(size, size_t(gart_page_size)));
|
||||
|
@ -2201,7 +2191,7 @@ ircd::cl::data::data(const mutable_buffer &buf,
|
|||
primary,
|
||||
flags,
|
||||
size,
|
||||
use_host_ptr? ptr: nullptr,
|
||||
ptr,
|
||||
&err
|
||||
);
|
||||
|
||||
|
@ -2219,17 +2209,15 @@ ircd::cl::data::data(const const_buffer &buf)
|
|||
|
||||
const auto &size
|
||||
{
|
||||
ptr?
|
||||
ircd::size(buf):
|
||||
size_t(std::get<1>(buf))
|
||||
ircd::size(buf)
|
||||
};
|
||||
|
||||
if(!size)
|
||||
return;
|
||||
|
||||
cl_mem_flags flags {0};
|
||||
flags |= CL_MEM_USE_HOST_PTR;
|
||||
flags |= CL_MEM_READ_ONLY;
|
||||
flags |= ptr && use_host_ptr? CL_MEM_USE_HOST_PTR: 0;
|
||||
|
||||
assert(!ptr || aligned(buf, size_t(gart_page_size)));
|
||||
assert(padded(size, size_t(gart_page_size)));
|
||||
|
@ -2240,7 +2228,7 @@ ircd::cl::data::data(const const_buffer &buf)
|
|||
primary,
|
||||
flags,
|
||||
size,
|
||||
use_host_ptr? mutable_cast(ptr): nullptr,
|
||||
mutable_cast(ptr),
|
||||
&err
|
||||
);
|
||||
|
||||
|
|
Loading…
Reference in a new issue