summaryrefslogtreecommitdiff
path: root/cpu_ref/rsd_cpu.h
diff options
context:
space:
mode:
authorStephen Hines <srhines@google.com>2013-02-12 19:32:38 -0800
committerStephen Hines <srhines@google.com>2013-02-14 13:53:21 -0800
commitf218bf115af4ae4fd79adbb8842608b308a4cf07 (patch)
treec8a4f8613ea61a2735ed450047bf45df4fdda605 /cpu_ref/rsd_cpu.h
parentb206acefa7ef03e02d3e8e161f8a1493329246b3 (diff)
downloadrs-f218bf115af4ae4fd79adbb8842608b308a4cf07.tar.gz
Support LinkRuntimeCallback() with RS compiler.
Change-Id: I28ada4e7c462cb9673de6886d934dce855fac339
Diffstat (limited to 'cpu_ref/rsd_cpu.h')
-rw-r--r--cpu_ref/rsd_cpu.h21
1 files changed, 20 insertions, 1 deletions
diff --git a/cpu_ref/rsd_cpu.h b/cpu_ref/rsd_cpu.h
index d96d2d1d..c9b8a717 100644
--- a/cpu_ref/rsd_cpu.h
+++ b/cpu_ref/rsd_cpu.h
@@ -19,6 +19,18 @@
#include "rsAllocation.h"
+namespace llvm {
+
+class Module;
+
+} // end namespace llvm
+
+namespace bcc {
+
+class RSScript;
+typedef llvm::Module* (*RSLinkRuntimeCallback) (bcc::RSScript *, llvm::Module *, llvm::Module *);
+
+} // end namespace bcc;
namespace android {
namespace renderscript {
@@ -66,6 +78,9 @@ public:
virtual Allocation * getAllocationForPointer(const void *ptr) const = 0;
virtual ~CpuScript() {}
+
+ virtual void * getRSExecutable() = 0;
+
};
typedef CpuScript * (* script_lookup_t)(Context *, const Script *s);
@@ -79,9 +94,11 @@ public:
static Context * getTlsContext();
static const Script * getTlsScript();
+ 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);
+ uint32_t version_minor, sym_lookup_t lfn, script_lookup_t slfn,
+ bcc::RSLinkRuntimeCallback pLinkRuntimeCallback = NULL);
virtual ~RsdCpuReference();
virtual void setPriority(int32_t priority) = 0;
@@ -90,6 +107,8 @@ public:
uint32_t flags) = 0;
virtual CpuScript * createIntrinsic(const Script *s, RsScriptIntrinsicID iid, Element *e) = 0;
virtual CpuScriptGroup * createScriptGroup(const ScriptGroup *sg) = 0;
+ virtual bool getInForEach() = 0;
+
};