Spinscale: create new namespace sscl
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
#include <preprocessor.h>
|
||||
#include <user/deviceAttachmentSpec.h>
|
||||
#include <spinscale/callback.h>
|
||||
#include <spinscale/componentThread.h>
|
||||
#define CL_TARGET_OPENCL_VERSION 120
|
||||
#include <CL/cl.h>
|
||||
|
||||
@@ -17,8 +18,6 @@ class OptionParser;
|
||||
|
||||
namespace smo {
|
||||
|
||||
class ComponentThread;
|
||||
|
||||
namespace compute {
|
||||
class ClBuffer;
|
||||
class ComputeDevice;
|
||||
@@ -45,7 +44,7 @@ struct SmoThreadingModelDesc
|
||||
* done on the ComponentThread for the thread that SMO provided in the
|
||||
* attachDeviceReq call.
|
||||
*/
|
||||
std::shared_ptr<ComponentThread> componentThread;
|
||||
std::shared_ptr<sscl::ComponentThread> componentThread;
|
||||
};
|
||||
|
||||
typedef std::function<void(bool, std::shared_ptr<device::DeviceAttachmentSpec>)>
|
||||
@@ -57,11 +56,11 @@ typedef int (sal_mlo_initializeIndFn)(void);
|
||||
typedef int (sal_mlo_finalizeIndFn)(void);
|
||||
typedef void (sal_mlo_attachDeviceReqFn)(
|
||||
const std::shared_ptr<device::DeviceAttachmentSpec>& desc,
|
||||
const std::shared_ptr<ComponentThread>& componentThread,
|
||||
Callback<sal_mlo_attachDeviceReqCbFn> cb);
|
||||
const std::shared_ptr<sscl::ComponentThread>& componentThread,
|
||||
sscl::Callback<sal_mlo_attachDeviceReqCbFn> cb);
|
||||
typedef void (sal_mlo_detachDeviceReqFn)(
|
||||
const std::shared_ptr<device::DeviceAttachmentSpec>& desc,
|
||||
Callback<sal_mlo_detachDeviceReqCbFn> cb);
|
||||
sscl::Callback<sal_mlo_detachDeviceReqCbFn> cb);
|
||||
|
||||
/**
|
||||
* @brief Hooks provided by Salmanoff to senseApi libraries.
|
||||
@@ -88,9 +87,9 @@ struct SmoCallbacks
|
||||
* @return Shared pointer to the current ComponentThread
|
||||
*
|
||||
* This function provides access to the current ComponentThread instance,
|
||||
* equivalent to calling ComponentThread::getSelf().
|
||||
* equivalent to calling sscl::ComponentThread::getSelf().
|
||||
*/
|
||||
std::shared_ptr<ComponentThread> (*ComponentThread_getSelf)(void);
|
||||
std::shared_ptr<sscl::ComponentThread> (*ComponentThread_getSelf)(void);
|
||||
|
||||
/**
|
||||
* @brief Get the OptionParser singleton instance
|
||||
|
||||
@@ -86,7 +86,7 @@ public:
|
||||
bool hasBufferWithQualeIfaceApi(const std::string& qualeIfaceApi) const;
|
||||
|
||||
protected:
|
||||
SpinLock frameAssemblyRateLimiter;
|
||||
sscl::SpinLock frameAssemblyRateLimiter;
|
||||
|
||||
// Virtual functions for derived classes to override
|
||||
virtual int getStopDelayMs() const
|
||||
@@ -106,7 +106,7 @@ public:
|
||||
private:
|
||||
boost::asio::io_service& ioService;
|
||||
protected:
|
||||
SpinLock shouldContinueLock;
|
||||
sscl::SpinLock shouldContinueLock;
|
||||
bool shouldContinue;
|
||||
private:
|
||||
boost::asio::deadline_timer timer;
|
||||
|
||||
Reference in New Issue
Block a user