00001 /* 00002 * MicExecutor.h 00003 * 00004 * Created on: 17 lis 2015 00005 * Author: pmaciol 00006 */ 00007 00008 #ifndef MOD_FEM_VIEWER_FEMVIEWER_MIC_MICEXECUTOR_H_ 00009 #define MOD_FEM_VIEWER_FEMVIEWER_MIC_MICEXECUTOR_H_ 00010 00011 #include<memory> 00012 #include "mic.h" 00013 #include "fv_float.h" 00014 #include "GraphicElem.hpp" 00015 00016 namespace FemViewer { 00017 namespace MIC { 00018 00019 class MicRenderer; 00020 00021 class MicExecutor { 00022 public: 00023 MicExecutor(int type = mic_CPU); 00024 virtual ~MicExecutor(); 00025 00026 int GetCore() const { return m_core; } 00027 00028 bool Execute(void* (*pfn)(void*)); 00029 void SetRenderingInegrationType(vol_rend_integr_t type); 00030 protected: 00031 template<int Target> 00032 int SelectMeshElements(void* data); 00033 00034 00035 private: 00036 MicRenderer* m_render; 00037 int m_core; 00038 vol_rend_integr_t m_integrtype; 00039 ScalarValueType m_epsilon; 00040 ScalarValueType m_hstep; 00041 00042 std::shared_ptr<HostTransferFunction> m_tf; 00043 00044 bool m_initialized; 00045 bool m_skipempty; 00046 00047 }; 00048 00049 } /* namespace MIC */ 00050 } /* namespace FemViewer */ 00051 00052 #endif /* MOD_FEM_VIEWER_FEMVIEWER_MIC_MICEXECUTOR_H_ */