1#ifndef CNetPanelForcesOcl_h
2#define CNetPanelForcesOcl_h
7#include "sfh/timers/ProfilerWallclock.h"
8#include "sfh/filters/FIR.h"
20 size_t workGroupSize[1];
29 void LoadProgram(
const char* relative_path);
37 float* adNodesDistMesh,
40 float* adMeshBarLength_unstretched,
41 float* adKnotDiameter,
42 float* adKnotMomStiff_contact,
44 float* adDampingCoeff,
46 float* adTwineDragNormal,
47 float* adTwineDiameter,
48 float m_CnLinearLimitAngle,
55 float m_CnKnots_nominal,
59 void StartNetPanelForcCalc(
const double*
const adPosAndVel,
float* afWaterVel_ned);
60 void GetNetPanelForces(
double* adForces);
62 void InitializeGlBuffer(
unsigned int bufobj);
66 cl_platform_id platform;
69 cl_device_id* devices;
71 unsigned int deviceUsed;
75 cl_command_queue command_queue;
86 void BuildExecutable();
88 char *FileContents(
const char *filename,
int *length);
90 cl_int GetPlatformID(cl_platform_id* clSelectedPlatformID);
91 const char* GetErrorString(cl_int error);
98 cl_mem cmPinnedBufInPos;
101 cl_mem cmPinnedBufInVel;
102 cl_mem cmDevBufInVel;
104 cl_mem cmPinnedBufInWaterVel;
105 cl_mem cmDevBufInWaterVel;
106 float* cDataInWaterVel;
108 cl_mem cmPinnedBufOutForce;
109 cl_mem cmDevBufOutForce;
110 float* cDataOutForce;
117 cl_mem cl_afNodesDistMesh;
120 cl_mem cl_afMeshBarLength_unstretched;
121 cl_mem cl_afKnotDiameter;
122 cl_mem cl_afKnotMomStiff_contact;
123 cl_mem cl_afNodeWeight;
124 cl_mem cl_afDampingCoeff;
126 cl_mem cl_afTwineDragNormal;
127 cl_mem cl_afTwineDiameter;
128 cl_mem cl_CnLinearLimitAngle;
134 cl_mem cl_Ct_nominal;
135 cl_mem cl_CnKnots_nominal;
138 cl_mem cl_renderbuffer;
140 float* m_afElementForces;
141 float* m_afElementNodesPos;
142 float* m_afElementNodesVel;
147 sfh::timers::ProfilerWallclock m_Profiler;
148 sfh::filters::FIR m_ProfileFilter;
Definition: CNetPanelForcesOcl.h:10