#ifndef OPENPOSE_CORE_GPU_RENDERER_HPP #define OPENPOSE_CORE_GPU_RENDERER_HPP #include #include #include #include namespace op { class OP_API GpuRenderer : public Renderer { public: explicit GpuRenderer( const float renderThreshold, const float alphaKeypoint, const float alphaHeatMap, const bool blendOriginalFrame = true, const unsigned int elementToRender = 0u, const unsigned int numberElementsToRender = 0u); virtual ~GpuRenderer(); std::tuple, std::shared_ptr, std::shared_ptr>, std::shared_ptr, std::shared_ptr> getSharedParameters(); void setSharedParametersAndIfLast( const std::tuple, std::shared_ptr, std::shared_ptr>, std::shared_ptr, std::shared_ptr>& tuple, const bool isLast); void setSharedParameters( const std::tuple, std::shared_ptr, std::shared_ptr>& tuple); protected: std::shared_ptr spGpuMemory; void cpuToGpuMemoryIfNotCopiedYet(const float* const cpuMemory, const unsigned long long memoryVolume); void gpuToCpuMemoryIfLastRenderer(float* cpuMemory, const unsigned long long memoryVolume); private: std::shared_ptr spVolume; bool mIsFirstRenderer; bool mIsLastRenderer; std::shared_ptr spGpuMemoryAllocated; DELETE_COPY(GpuRenderer); }; } #endif // OPENPOSE_CORE_GPU_RENDERER_HPP