Accelerated Computation Engine
Public Member Functions | List of all members
OpenCL::Program Class Reference

#include <opencl_program.h>

Inheritance diagram for OpenCL::Program:

Public Member Functions

 Program (Context *context, const QStringList &paths, QObject *parent)
 
virtual ~Program () override final
 
cl_program id () const
 

Detailed Description

This contains an OpenCL program. The primary purpose of this class is to build a given list of files assumed to be OpenCL kernel source code. All devices part of the context this program is derived from compiles all the source files given. The only other purpose of this class is to provide its OpenCL program ID to create kernels from the built program kernel code.

Constructor & Destructor Documentation

◆ Program()

Program::Program ( Context context,
const QStringList &  paths,
QObject *  parent 
)
explicit

Construct a new program with the given context, list of OpenCL kernel source code file paths, and optional parent. If any OpenCL error occurs then an exception is thrown.

Parameters
contextPointer to context this program is created from.
pathsList of file paths containing OpenCL kernel source code that this program builds for all devices of the given context.
parentOptional parent for this new program.

◆ ~Program()

Program::~Program ( )
finaloverridevirtual

Releases the underlying OpenCL program that this object represents.

Member Function Documentation

◆ id()

cl_program Program::id ( ) const

Returns the OpenCL program ID of this object.

Returns
OpenCL program ID of this object.

The documentation for this class was generated from the following files: