Andreas Kloeckner <[email protected]> writes:
> Andreas Kloeckner <[email protected]> writes:
>> Thanks for your quick response! Unfortunately, something must be off
>> still, as CL_MEM_TYPE for what should be a buffer object gives
>> 1071312404, i.e. what looks essentially like a random number. Which is
>> not quite surprising, because clCreateBuffer doesn't set that
>> entry... :)
>
> Trivial patch attached to fix this. This makes at least PyOpenCL's
> example/demo.py work.
Whoops, fixed patch--that last one had too much stuff.
Sorry,
Andreas
=== modified file 'lib/CL/clCreateBuffer.c'
--- lib/CL/clCreateBuffer.c 2012-05-25 16:05:51 +0000
+++ lib/CL/clCreateBuffer.c 2012-08-21 01:24:56 +0000
@@ -48,6 +48,7 @@
mem->parent = NULL;
mem->map_count = 0;
mem->mappings = NULL;
+ mem->type = CL_MEM_OBJECT_BUFFER;
mem->flags = flags;
mem->is_image = CL_FALSE;
POCL_INIT_ICD_OBJECT(mem);
=== modified file 'lib/CL/clCreateImage2D.c'
--- lib/CL/clCreateImage2D.c 2012-05-25 17:10:55 +0000
+++ lib/CL/clCreateImage2D.c 2012-08-21 01:25:36 +0000
@@ -30,6 +30,7 @@
mem->parent = NULL;
mem->map_count = 0;
mem->mappings = NULL;
+ mem->type = CL_MEM_OBJECT_IMAGE2D;
mem->flags = flags;
mem->is_image = CL_TRUE;
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
pocl-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pocl-devel