Rename: OpenGlSplittingEngine=>OpenGlCollatingAndMeshingEngine
This commit is contained in:
@@ -42,7 +42,7 @@ if(ENABLE_STIMBUFFAPI_livoxGen1)
|
|||||||
stagingBuffer.cpp
|
stagingBuffer.cpp
|
||||||
pcloudStimulusBuffer.cpp
|
pcloudStimulusBuffer.cpp
|
||||||
ioUringAssemblyEngine.cpp
|
ioUringAssemblyEngine.cpp
|
||||||
openClSplittingEngine.cpp
|
openClCollatingAndMeshingEngine.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
target_include_directories(livoxGen1 PUBLIC
|
target_include_directories(livoxGen1 PUBLIC
|
||||||
|
|||||||
+6
-5
@@ -1,13 +1,13 @@
|
|||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include "openClSplittingEngine.h"
|
#include "openClCollatingAndMeshingEngine.h"
|
||||||
#include "pcloudStimulusBuffer.h"
|
#include "pcloudStimulusBuffer.h"
|
||||||
|
|
||||||
namespace smo {
|
namespace smo {
|
||||||
namespace stim_buff {
|
namespace stim_buff {
|
||||||
|
|
||||||
OpenClSplittingEngine::OpenClSplittingEngine(PcloudStimulusBuffer& parent_)
|
OpenClCollatingAndMeshingEngine::OpenClCollatingAndMeshingEngine(PcloudStimulusBuffer& parent_)
|
||||||
: parent(parent_),
|
: parent(parent_),
|
||||||
platform(nullptr),
|
platform(nullptr),
|
||||||
device(nullptr),
|
device(nullptr),
|
||||||
@@ -22,12 +22,12 @@ intensityBuffer(nullptr)
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
OpenClSplittingEngine::~OpenClSplittingEngine()
|
OpenClCollatingAndMeshingEngine::~OpenClCollatingAndMeshingEngine()
|
||||||
{
|
{
|
||||||
finalize();
|
finalize();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool OpenClSplittingEngine::setup()
|
bool OpenClCollatingAndMeshingEngine::setup()
|
||||||
{
|
{
|
||||||
if (isSetup) {
|
if (isSetup) {
|
||||||
return true;
|
return true;
|
||||||
@@ -81,7 +81,7 @@ cleanup:
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void OpenClSplittingEngine::finalize()
|
void OpenClCollatingAndMeshingEngine::finalize()
|
||||||
{
|
{
|
||||||
if (intensityBuffer) {
|
if (intensityBuffer) {
|
||||||
clReleaseMemObject(intensityBuffer);
|
clReleaseMemObject(intensityBuffer);
|
||||||
@@ -119,3 +119,4 @@ void OpenClSplittingEngine::finalize()
|
|||||||
|
|
||||||
} // namespace stim_buff
|
} // namespace stim_buff
|
||||||
} // namespace smo
|
} // namespace smo
|
||||||
|
|
||||||
@@ -0,0 +1,56 @@
|
|||||||
|
#ifndef _LIVOX_GEN1_OPENCL_COLLATING_AND_MESHING_ENGINE_H
|
||||||
|
#define _LIVOX_GEN1_OPENCL_COLLATING_AND_MESHING_ENGINE_H
|
||||||
|
|
||||||
|
#include <cstdint>
|
||||||
|
#include <cstddef>
|
||||||
|
#include <memory>
|
||||||
|
#define CL_TARGET_OPENCL_VERSION 300
|
||||||
|
#include <CL/cl.h>
|
||||||
|
|
||||||
|
namespace smo {
|
||||||
|
namespace stim_buff {
|
||||||
|
|
||||||
|
class PcloudStimulusBuffer;
|
||||||
|
|
||||||
|
class OpenClCollatingAndMeshingEngine
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
explicit OpenClCollatingAndMeshingEngine(PcloudStimulusBuffer& parent);
|
||||||
|
~OpenClCollatingAndMeshingEngine();
|
||||||
|
|
||||||
|
// Non-copyable, movable
|
||||||
|
OpenClCollatingAndMeshingEngine(
|
||||||
|
const OpenClCollatingAndMeshingEngine&) = delete;
|
||||||
|
OpenClCollatingAndMeshingEngine& operator=(
|
||||||
|
const OpenClCollatingAndMeshingEngine&) = delete;
|
||||||
|
OpenClCollatingAndMeshingEngine(
|
||||||
|
OpenClCollatingAndMeshingEngine&&) = default;
|
||||||
|
OpenClCollatingAndMeshingEngine& operator=(
|
||||||
|
OpenClCollatingAndMeshingEngine&&) = default;
|
||||||
|
|
||||||
|
bool setup();
|
||||||
|
void finalize();
|
||||||
|
|
||||||
|
private:
|
||||||
|
PcloudStimulusBuffer& parent;
|
||||||
|
|
||||||
|
// OpenCL infrastructure
|
||||||
|
cl_platform_id platform;
|
||||||
|
cl_device_id device;
|
||||||
|
cl_context context;
|
||||||
|
cl_command_queue commandQueue;
|
||||||
|
cl_program program;
|
||||||
|
cl_kernel kernel;
|
||||||
|
bool isSetup;
|
||||||
|
|
||||||
|
// OpenCL buffers
|
||||||
|
cl_mem assemblyBuffer;
|
||||||
|
cl_mem xyzBuffer;
|
||||||
|
cl_mem intensityBuffer;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace stim_buff
|
||||||
|
} // namespace smo
|
||||||
|
|
||||||
|
#endif // _LIVOX_GEN1_OPENCL_COLLATING_AND_MESHING_ENGINE_H
|
||||||
|
|
||||||
@@ -1,51 +0,0 @@
|
|||||||
#ifndef _LIVOX_GEN1_OPENCL_SPLITTING_ENGINE_H
|
|
||||||
#define _LIVOX_GEN1_OPENCL_SPLITTING_ENGINE_H
|
|
||||||
|
|
||||||
#include <cstdint>
|
|
||||||
#include <cstddef>
|
|
||||||
#include <memory>
|
|
||||||
#define CL_TARGET_OPENCL_VERSION 300
|
|
||||||
#include <CL/cl.h>
|
|
||||||
|
|
||||||
namespace smo {
|
|
||||||
namespace stim_buff {
|
|
||||||
|
|
||||||
class PcloudStimulusBuffer;
|
|
||||||
|
|
||||||
class OpenClSplittingEngine
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
explicit OpenClSplittingEngine(PcloudStimulusBuffer& parent);
|
|
||||||
~OpenClSplittingEngine();
|
|
||||||
|
|
||||||
// Non-copyable, movable
|
|
||||||
OpenClSplittingEngine(const OpenClSplittingEngine&) = delete;
|
|
||||||
OpenClSplittingEngine& operator=(const OpenClSplittingEngine&) = delete;
|
|
||||||
OpenClSplittingEngine(OpenClSplittingEngine&&) = default;
|
|
||||||
OpenClSplittingEngine& operator=(OpenClSplittingEngine&&) = default;
|
|
||||||
|
|
||||||
bool setup();
|
|
||||||
void finalize();
|
|
||||||
|
|
||||||
private:
|
|
||||||
PcloudStimulusBuffer& parent;
|
|
||||||
|
|
||||||
// OpenCL infrastructure
|
|
||||||
cl_platform_id platform;
|
|
||||||
cl_device_id device;
|
|
||||||
cl_context context;
|
|
||||||
cl_command_queue commandQueue;
|
|
||||||
cl_program program;
|
|
||||||
cl_kernel kernel;
|
|
||||||
bool isSetup;
|
|
||||||
|
|
||||||
// OpenCL buffers
|
|
||||||
cl_mem assemblyBuffer;
|
|
||||||
cl_mem xyzBuffer;
|
|
||||||
cl_mem intensityBuffer;
|
|
||||||
};
|
|
||||||
|
|
||||||
} // namespace stim_buff
|
|
||||||
} // namespace smo
|
|
||||||
|
|
||||||
#endif // _LIVOX_GEN1_OPENCL_SPLITTING_ENGINE_H
|
|
||||||
Reference in New Issue
Block a user