Refactored CMakeLists.txt
* new pip_module() macro * fixed exports * automatic gather all exports and pass them to Doxygen and PICodeParser
This commit is contained in:
@@ -20,10 +20,11 @@
|
||||
#ifndef PIOPENCL_H
|
||||
#define PIOPENCL_H
|
||||
|
||||
#include "pip_opencl_export.h"
|
||||
#include "pivariant.h"
|
||||
|
||||
|
||||
class PIOpenCL {
|
||||
class PIP_OPENCL_EXPORT PIOpenCL {
|
||||
public:
|
||||
|
||||
struct KernelArg;
|
||||
@@ -69,7 +70,7 @@ public:
|
||||
Double,
|
||||
};
|
||||
|
||||
struct KernelArg {
|
||||
struct PIP_OPENCL_EXPORT KernelArg {
|
||||
KernelArg();
|
||||
AddressQualifier address_qualifier;
|
||||
AccessQualifier access_qualifier;
|
||||
@@ -85,7 +86,7 @@ public:
|
||||
void init(void * _k, uint index);
|
||||
};
|
||||
|
||||
struct Device {
|
||||
struct PIP_OPENCL_EXPORT Device {
|
||||
Device() {id = platform_id = 0; max_compute_units = max_clock_frequency = 0; max_memory_size = 0;}
|
||||
bool isValid() const {return id != 0;}
|
||||
PIString displayText() const {return name.trimmed() + " (" + device_version.trimmed() + ")";}
|
||||
@@ -100,7 +101,7 @@ public:
|
||||
ullong max_memory_size;
|
||||
};
|
||||
|
||||
struct Platform {
|
||||
struct PIP_OPENCL_EXPORT Platform {
|
||||
Platform() {id = 0;}
|
||||
bool isValid() const {return id != 0;}
|
||||
PIString displayText() const {return name.trimmed() + " (" + version.trimmed() + ", " + profile.trimmed() + ")";}
|
||||
@@ -113,7 +114,7 @@ public:
|
||||
PIVector<Device> devices;
|
||||
};
|
||||
|
||||
class Context {
|
||||
class PIP_OPENCL_EXPORT Context {
|
||||
friend class Program;
|
||||
public:
|
||||
~Context();
|
||||
@@ -125,10 +126,10 @@ public:
|
||||
void zero();
|
||||
void deletePrograms();
|
||||
PIVector<Program * > programs_;
|
||||
PRIVATE_DECLARATION
|
||||
PRIVATE_DECLARATION(PIP_OPENCL_EXPORT)
|
||||
};
|
||||
|
||||
class Program {
|
||||
class PIP_OPENCL_EXPORT Program {
|
||||
friend class Context;
|
||||
friend class Kernel;
|
||||
public:
|
||||
@@ -143,10 +144,10 @@ public:
|
||||
Context * context_;
|
||||
PIString source_;
|
||||
PIVector<Kernel * > kernels_;
|
||||
PRIVATE_DECLARATION
|
||||
PRIVATE_DECLARATION(PIP_OPENCL_EXPORT)
|
||||
};
|
||||
|
||||
class Kernel {
|
||||
class PIP_OPENCL_EXPORT Kernel {
|
||||
friend class Program;
|
||||
public:
|
||||
const PIString & name() const {return name_;}
|
||||
@@ -165,7 +166,7 @@ public:
|
||||
Program * program_;
|
||||
PIString name_;
|
||||
PIVector<KernelArg> args_;
|
||||
PRIVATE_DECLARATION
|
||||
PRIVATE_DECLARATION(PIP_OPENCL_EXPORT)
|
||||
};
|
||||
|
||||
static void init();
|
||||
@@ -177,7 +178,7 @@ public:
|
||||
private:
|
||||
static PIString prog_header;
|
||||
PIOpenCL() {;}
|
||||
class Initializer {
|
||||
class PIP_OPENCL_EXPORT Initializer {
|
||||
public:
|
||||
Initializer();
|
||||
static Initializer * instance();
|
||||
|
||||
Reference in New Issue
Block a user