From f364294c2c35de195dff4a01cfdde6855850668d Mon Sep 17 00:00:00 2001 From: David Hilvert Date: Mon, 24 Aug 2009 03:26:48 +0000 Subject: [PATCH] src/libale: Rearrange and comment for memory table definition. --- src/libale.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/libale.h b/src/libale.h index c621e86..4cc74f7 100644 --- a/src/libale.h +++ b/src/libale.h @@ -76,8 +76,7 @@ static point point_neginf(int dim) { } /* - * Get ale_context associated with a table index from an ALE_POINTER to device - * memory. + * Element of the device memory table. * * XXX: this might be better done as a table with struct { ale_context c; cl_mem m[0]; }; */ @@ -87,6 +86,11 @@ typedef union { ale_context context; } mem_table_entry; +/* + * Get ale_context associated with a table index from an ALE_POINTER to device + * memory. + */ + static ale_context api_to_ac(cl_long index) { mem_table_entry *p = (mem_table_entry *) (((char *) NULL) + index); -- 2.11.4.GIT