summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cpu_ref/rsCpuCore.cpp12
-rw-r--r--cpu_ref/rsCpuCore.h4
-rw-r--r--cpu_ref/rsCpuScript.cpp21
-rw-r--r--cpu_ref/rsCpuScript.h2
-rw-r--r--cpu_ref/rsd_cpu.h10
5 files changed, 22 insertions, 27 deletions
diff --git a/cpu_ref/rsCpuCore.cpp b/cpu_ref/rsCpuCore.cpp
index 06e5ce7c..c78b2384 100644
--- a/cpu_ref/rsCpuCore.cpp
+++ b/cpu_ref/rsCpuCore.cpp
@@ -46,8 +46,11 @@ RsdCpuReference::~RsdCpuReference() {
}
RsdCpuReference * RsdCpuReference::create(Context *rsc, uint32_t version_major,
- uint32_t version_minor, sym_lookup_t lfn, script_lookup_t slfn,
- bcc::RSLinkRuntimeCallback pLinkRuntimeCallback) {
+ uint32_t version_minor, sym_lookup_t lfn, script_lookup_t slfn
+#ifndef RS_COMPATIBILITY_LIB
+ , bcc::RSLinkRuntimeCallback pLinkRuntimeCallback
+#endif
+ ) {
RsdCpuReferenceImpl *cpu = new RsdCpuReferenceImpl(rsc);
if (!cpu) {
@@ -58,7 +61,9 @@ RsdCpuReference * RsdCpuReference::create(Context *rsc, uint32_t version_major,
return NULL;
}
+#ifndef RS_COMPATIBILITY_LIB
cpu->setLinkRuntimeCallback(pLinkRuntimeCallback);
+#endif
return cpu;
}
@@ -88,8 +93,9 @@ RsdCpuReferenceImpl::RsdCpuReferenceImpl(Context *rsc) {
memset(&mWorkers, 0, sizeof(mWorkers));
memset(&mTlsStruct, 0, sizeof(mTlsStruct));
mExit = false;
+#ifndef RS_COMPATIBILITY_LIB
mLinkRuntimeCallback = NULL;
-
+#endif
}
diff --git a/cpu_ref/rsCpuCore.h b/cpu_ref/rsCpuCore.h
index 4c43a8d4..3ff8636f 100644
--- a/cpu_ref/rsCpuCore.h
+++ b/cpu_ref/rsCpuCore.h
@@ -110,6 +110,7 @@ public:
return mScriptLookupFn(mRSC, s);
}
+#ifndef RS_COMPATIBILITY_LIB
void setLinkRuntimeCallback(
bcc::RSLinkRuntimeCallback pLinkRuntimeCallback) {
mLinkRuntimeCallback = pLinkRuntimeCallback;
@@ -117,6 +118,7 @@ public:
bcc::RSLinkRuntimeCallback getLinkRuntimeCallback() {
return mLinkRuntimeCallback;
}
+#endif
virtual bool getInForEach() { return mInForEach; }
protected:
@@ -144,7 +146,9 @@ protected:
ScriptTLSStruct mTlsStruct;
+#ifndef RS_COMPATIBILITY_LIB
bcc::RSLinkRuntimeCallback mLinkRuntimeCallback;
+#endif
};
diff --git a/cpu_ref/rsCpuScript.cpp b/cpu_ref/rsCpuScript.cpp
index 80f8ea01..356139fb 100644
--- a/cpu_ref/rsCpuScript.cpp
+++ b/cpu_ref/rsCpuScript.cpp
@@ -144,27 +144,6 @@ void RsdCpuScriptImpl::populateScript(Script *script) {
}
}
-/*
-bool rsdInitIntrinsic(const Context *rsc, Script *s, RsScriptIntrinsicID iid, Element *e) {
- pthread_mutex_lock(&rsdgInitMutex);
-
- DrvScript *drv = (DrvScript *)calloc(1, sizeof(DrvScript));
- if (drv == NULL) {
- goto error;
- }
- s->mHal.drv = drv;
- drv->mIntrinsicID = iid;
- drv->mIntrinsicData = rsdIntrinsic_Init(rsc, s, iid, &drv->mIntrinsicFuncs);
- s->mHal.info.isThreadable = true;
-
- pthread_mutex_unlock(&rsdgInitMutex);
- return true;
-
-error:
- pthread_mutex_unlock(&rsdgInitMutex);
- return false;
-}
-*/
typedef void (*rs_t)(const void *, void *, const void *, uint32_t, uint32_t, uint32_t, uint32_t);
diff --git a/cpu_ref/rsCpuScript.h b/cpu_ref/rsCpuScript.h
index 53835bd0..6097c836 100644
--- a/cpu_ref/rsCpuScript.h
+++ b/cpu_ref/rsCpuScript.h
@@ -78,7 +78,9 @@ public:
virtual Allocation * getAllocationForPointer(const void *ptr) const;
+#ifndef RS_COMPATIBILITY_LIB
virtual void * getRSExecutable() { return mExecutable; }
+#endif
protected:
RsdCpuReferenceImpl *mCtx;
diff --git a/cpu_ref/rsd_cpu.h b/cpu_ref/rsd_cpu.h
index c9b8a717..1eee7deb 100644
--- a/cpu_ref/rsd_cpu.h
+++ b/cpu_ref/rsd_cpu.h
@@ -79,8 +79,9 @@ public:
virtual Allocation * getAllocationForPointer(const void *ptr) const = 0;
virtual ~CpuScript() {}
+#ifndef RS_COMPATIBILITY_LIB
virtual void * getRSExecutable() = 0;
-
+#endif
};
typedef CpuScript * (* script_lookup_t)(Context *, const Script *s);
@@ -97,8 +98,11 @@ public:
static pthread_key_t getThreadTLSKey();
static RsdCpuReference * create(Context *c, uint32_t version_major,
- uint32_t version_minor, sym_lookup_t lfn, script_lookup_t slfn,
- bcc::RSLinkRuntimeCallback pLinkRuntimeCallback = NULL);
+ uint32_t version_minor, sym_lookup_t lfn, script_lookup_t slfn
+#ifndef RS_COMPATIBILITY_LIB
+ , bcc::RSLinkRuntimeCallback pLinkRuntimeCallback = NULL
+#endif
+ );
virtual ~RsdCpuReference();
virtual void setPriority(int32_t priority) = 0;