From 617728adfab523c0a0ec70e8ede7e72fe8d6436c Mon Sep 17 00:00:00 2001
From: Andreas Kloeckner <inform@tiker.net>
Date: Sat, 29 Dec 2012 20:28:11 +0100
Subject: [PATCH] Minor fixes to the list-of-lists-builder.

---
 pyopencl/algorithm.py | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/pyopencl/algorithm.py b/pyopencl/algorithm.py
index 978d924e..8f5291e7 100644
--- a/pyopencl/algorithm.py
+++ b/pyopencl/algorithm.py
@@ -511,6 +511,8 @@ ${preamble}
 typedef ${index_type} index_type;
 
 %if is_count_stage:
+    #define PLB_COUNT_STAGE
+
     %for name, dtype in list_names_and_dtypes:
         %if name in count_sharing:
             #define APPEND_${name}(value) { /* nothing */ }
@@ -519,6 +521,8 @@ typedef ${index_type} index_type;
         %endif
     %endfor
 %else:
+    #define PLB_WRITE_STAGE
+
     %for name, dtype in list_names_and_dtypes:
         %if name in count_sharing:
             #define APPEND_${name}(value) \
@@ -976,9 +980,9 @@ class ListOfListsBuilder:
             else:
                 info_record = result[name]
 
-            info_record.list = cl.array.empty(queue,
+            info_record.lists = cl.array.empty(queue,
                     info_record.count, dtype, allocator=allocator)
-            write_list_args.append(info_record.list.data)
+            write_list_args.append(info_record.lists.data)
 
             if name not in self.count_sharing:
                 write_list_args.append(info_record.starts.data)
-- 
GitLab