|
AndroMeta
2.0.0
|
00001 /* 00002 * Copyright 2009-2012 AndroMeta LLC. All rights reserved. 00003 * 00004 * AndroMeta LLC retains all intellectual property and proprietary 00005 * rights to this software and related documentation and any modifications 00006 * thereto. Any use, reproduction, disclosure, or distribution of this 00007 * software and related documentation without an express license agreement 00008 * from AndroMeta LLC is strictly prohibited. 00009 * 00010 */ 00011 00018 #ifndef ANDROMETA_MPL_KERNEL_H 00019 #define ANDROMETA_MPL_KERNEL_H 00020 00021 #include <vector> 00022 00023 #include <AndroMeta/MVector.h> 00024 #include <AndroMeta/MNode.h> 00025 00026 namespace Meta{ 00027 00028 class MPLObject; 00029 00034 class MPLKernel{ 00035 public: 00036 00040 MPLKernel(); 00041 00045 ~MPLKernel(); 00046 00055 template<typename T> 00056 void compile(MVector<T>& ov, mnode n){ 00057 compile(reinterpret_cast<MPLObject**>(&ov[0]), ov.size(), n); 00058 } 00059 00063 template<typename T> 00064 void compile(std::vector<T>& ov, mnode n){ 00065 compile(reinterpret_cast<MPLObject**>(&ov[0]), ov.size(), n); 00066 } 00067 00071 void compile(MPLObject** ov, size_t count, mnode n); 00072 00076 void start(); 00077 00082 void await(); 00083 00087 void run(); 00088 00096 static void setWorkSize(size_t workSize); 00097 00098 private: 00099 class MPLKernel_* x_; 00100 }; 00101 00102 } // end namespace Meta 00103 00104 #endif // ANDROMETA_MPL_KERNEL_H
1.7.6.1