Pass the class object from the host to the device

I am a new learner in OpenCL C++ on GPU. I encounter a program problem. The problem is that how to pass the class object from the host to the device. The kernel arguments involve the class object. In the class object, there is a float or integer pointer, which is used to allocate a dynamic array.
Could you show the solution to this problem (it’s better you can give an simple example)? Thanks.