Move ClBuffer/ComputeDevice methods into libattachmentSupport
This commit is contained in:
@@ -3,12 +3,18 @@
|
||||
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
#include <string_view>
|
||||
#define CL_TARGET_OPENCL_VERSION 120
|
||||
#include <CL/cl.h>
|
||||
|
||||
namespace smo {
|
||||
namespace compute {
|
||||
|
||||
// Helper function to validate OpenCL version
|
||||
bool validateOpenClVersion(
|
||||
std::string_view versionStr, std::string_view versionType,
|
||||
int minMajor, int minMinor);
|
||||
|
||||
/**
|
||||
* @brief OpenCL compute device information
|
||||
*
|
||||
@@ -108,6 +114,14 @@ public:
|
||||
ClBuffer(const ClBuffer&) = delete;
|
||||
ClBuffer& operator=(const ClBuffer&) = delete;
|
||||
|
||||
/**
|
||||
* @brief Get the cl_mem handle for a specific compute device
|
||||
* @param device The compute device to find the buffer for
|
||||
* @return The cl_mem handle for the device, or nullptr if not found
|
||||
*/
|
||||
cl_mem getAssociatedBufferHandleForDevice(
|
||||
const std::shared_ptr<ComputeDevice>& device) const;
|
||||
|
||||
void* hostPtr;
|
||||
size_t size;
|
||||
cl_mem_flags flags;
|
||||
|
||||
Reference in New Issue
Block a user