Fixed error in SDK and test
This commit is contained in:
@@ -75,4 +75,15 @@ extern void register_memory(void* ptr, deallocator_t deallocator);
|
||||
__AQEXPORT__(void) init_session(Context* cxt);
|
||||
|
||||
#define __AQ_NO_SESSION__ __AQEXPORT__(void) init_session(Context*) {}
|
||||
void* memcpy(void*, void*, unsigned long long);
|
||||
struct ColRef_storage {
|
||||
void* container;
|
||||
unsigned int capacity, size;
|
||||
const char* name;
|
||||
int ty; // what if enum is not int?
|
||||
template <class Ty, template <typename> class VT>
|
||||
ColRef_storage(const VT<Ty>& vt) {
|
||||
memcpy(this, &vt, sizeof(ColRef_storage));
|
||||
}
|
||||
};
|
||||
#endif
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
#include <memory>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include <unordered_map>
|
||||
|
||||
Session* session;
|
||||
|
||||
+5
-2
@@ -2,10 +2,13 @@
|
||||
// __AQ_NO_SESSION__
|
||||
#include "../server/table.h"
|
||||
|
||||
__AQEXPORT__(ColRef<float>) mulvec(int a, ColRef<float> b){
|
||||
__AQEXPORT__(ColRef_storage) mulvec(int a, ColRef<float> b){
|
||||
return a * b;
|
||||
}
|
||||
|
||||
__AQEXPORT__(double) mydiv(int a, int b){
|
||||
return a / (double)b;
|
||||
printf("%d, %d\n", a, b);
|
||||
double d = a/(double)b;
|
||||
printf("%lf", d);
|
||||
return d;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user