浏览代码

Make starpu_interface_matrix_ops public

Samuel Thibault 12 年之前
父节点
当前提交
159317c1dc

+ 2 - 2
examples/spmv/dw_block_spmv.c

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
- * Copyright (C) 2009, 2010-2011  Université de Bordeaux 1
+ * Copyright (C) 2009-2012  Université de Bordeaux 1
  * Copyright (C) 2010  Mehdi Juhoor <mjuhoor@gmail.com>
  * Copyright (C) 2010, 2011, 2012  Centre National de la Recherche Scientifique
  *
@@ -112,7 +112,7 @@ unsigned get_bcsr_nchildren(__attribute__((unused)) struct starpu_data_filter *f
 
 struct starpu_data_interface_ops *get_bcsr_child_ops(__attribute__((unused)) struct starpu_data_filter *f, __attribute__((unused)) unsigned child) 
 {
-  return &_starpu_interface_matrix_ops;
+  return &starpu_interface_matrix_ops;
 }
 
 void call_filters(void)

+ 1 - 4
include/starpu_data_interfaces.h

@@ -167,10 +167,7 @@ void *starpu_handle_get_local_ptr(starpu_data_handle_t handle);
 
 void *starpu_data_get_interface_on_node(starpu_data_handle_t handle, unsigned memory_node);
 
-#ifdef STARPU_DEVEL
-#  warning the declaration below is needed for the spvm example (dw_block_spmv.c:110) which filters a data in sub-data with a different interface. However exposing a private object is certainly not something to do. Either turn the object public or find another way to specify interfaces when filtering
-#endif /* STARPU_DEVEL */
-extern struct starpu_data_interface_ops _starpu_interface_matrix_ops;
+extern struct starpu_data_interface_ops starpu_interface_matrix_ops;
 
 /* Matrix interface for dense matrices */
 struct starpu_matrix_interface

+ 1 - 1
src/datawizard/interfaces/data_interface.h

@@ -22,7 +22,7 @@
 #include <common/config.h>
 
 /* Some data interfaces or filters use this interface internally */
-extern struct starpu_data_interface_ops _starpu_interface_matrix_ops;
+extern struct starpu_data_interface_ops starpu_interface_matrix_ops;
 void _starpu_data_free_interfaces(starpu_data_handle_t handle)
 	STARPU_ATTRIBUTE_INTERNAL;
 

+ 2 - 2
src/datawizard/interfaces/matrix_interface.c

@@ -84,7 +84,7 @@ static void display_matrix_interface(starpu_data_handle_t handle, FILE *f);
 static int convert_matrix_to_gordon(void *data_interface, uint64_t *ptr, gordon_strideSize_t *ss);
 #endif
 
-struct starpu_data_interface_ops _starpu_interface_matrix_ops =
+struct starpu_data_interface_ops starpu_interface_matrix_ops =
 {
 	.register_data_handle = register_matrix_handle,
 	.allocate_data_on_node = allocate_matrix_buffer_on_node,
@@ -178,7 +178,7 @@ void starpu_matrix_data_register(starpu_data_handle_t *handleptr, uint32_t home_
                 .offset = 0
 	};
 
-	starpu_data_register(handleptr, home_node, &matrix_interface, &_starpu_interface_matrix_ops);
+	starpu_data_register(handleptr, home_node, &matrix_interface, &starpu_interface_matrix_ops);
 }
 
 static uint32_t footprint_matrix_interface_crc32(starpu_data_handle_t handle)