mirror of
https://github.com/matrix-construct/construct
synced 2024-11-16 15:00:51 +01:00
40 lines
1.2 KiB
C++
40 lines
1.2 KiB
C++
// The Construct
|
|
//
|
|
// Copyright (C) The Construct Developers, Authors & Contributors
|
|
// Copyright (C) 2016-2022 Jason Volk <jason@zemos.net>
|
|
//
|
|
// Permission to use, copy, modify, and/or distribute this software for any
|
|
// purpose with or without fee is hereby granted, provided that the above
|
|
// copyright notice and this permission notice is present in all copies. The
|
|
// full license for this software is available in the LICENSE file.
|
|
|
|
#pragma once
|
|
#define HAVE_IRCD_CL_CODE_H
|
|
|
|
/// cl_program wrapping
|
|
struct ircd::cl::code
|
|
{
|
|
void *handle {nullptr};
|
|
|
|
public:
|
|
long status() const;
|
|
size_t devs() const;
|
|
size_t bins(const vector_view<size_t> &) const;
|
|
size_t bins_size() const;
|
|
|
|
vector_view<const mutable_buffer> bin(vector_view<mutable_buffer>) const;
|
|
string_view src(const mutable_buffer &) const;
|
|
|
|
void compile(const string_view &opts = {});
|
|
void link(const string_view &opts = {});
|
|
void build(const string_view &opts = {});
|
|
|
|
explicit code(const vector_view<const const_buffer> &bins);
|
|
code(const vector_view<const string_view> &srcs);
|
|
code(const string_view &src);
|
|
code() = default;
|
|
code(code &&) noexcept;
|
|
code &operator=(const code &) = delete;
|
|
code &operator=(code &&) noexcept;
|
|
~code() noexcept;
|
|
};
|