summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Stellard <thomas.stellard@amd.com>2012-02-21 17:56:39 -0500
committerTom Stellard <thomas.stellard@amd.com>2012-02-21 17:56:39 -0500
commit79f65e5747ab7719462a8084d05055551781f0c5 (patch)
tree2c3c9c2bd225a1de20c87d231be5d6a2f435ccf1
parent48bbcd2b97896c45559bd807bfe9f3ea084c7f57 (diff)
Define __global as address space 1
-rw-r--r--hello_world.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/hello_world.c b/hello_world.c
index 7cf6860..1ca145a 100644
--- a/hello_world.c
+++ b/hello_world.c
@@ -47,13 +47,14 @@ const char * err_string(cl_int error)
}
}
-const char * program_src =
+const char * program_src =
+"#define __global __attribute__((address_space(1)))\n"
"__kernel\n"
"void pi(__global float * out) \n"
"{\n"
" out[0] = 3.14159f;\n"
"}\n";
-
+
int main(int argc, char ** argv)
{