* eina: Add first version of a Quad Tree data type.
authorcedric <cedric>
Thu, 29 Apr 2010 17:21:14 +0000 (17:21 +0000)
committercedric <cedric@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 29 Apr 2010 17:21:14 +0000 (17:21 +0000)
NOTE: consider the API experimental and subject to change.

git-svn-id: http://svn.enlightenment.org/svn/e/trunk/eina@48424 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/include/Eina.h
src/include/Makefile.am
src/include/eina_main.h
src/include/eina_private.h
src/lib/Makefile.am
src/lib/eina_main.c
src/tests/Makefile.am
src/tests/eina_bench.c
src/tests/eina_bench.h
src/tests/eina_suite.c
src/tests/eina_suite.h

index a5a5668..ff00731 100644 (file)
@@ -143,6 +143,7 @@ extern "C" {
 #include "eina_matrixsparse.h"
 #include "eina_str.h"
 #include "eina_strbuf.h"
+#include "eina_quadtree.h"
 
 #ifdef __cplusplus
 }
index 71b9a77..6022d43 100644 (file)
@@ -45,7 +45,8 @@ eina_matrixsparse.h \
 eina_inline_tiler.x \
 eina_str.h \
 eina_inline_str.x \
-eina_strbuf.h
+eina_strbuf.h \
+eina_quadtree.h
 
 installed_mainheaderdir = $(includedir)/eina-@VMAJ@
 dist_installed_mainheader_DATA = Eina.h eina_config.h
index dc4f519..eec05e1 100644 (file)
@@ -19,6 +19,9 @@
 #ifndef EINA_MAIN_H_
 #define EINA_MAIN_H_
 
+
+#include "eina_types.h"
+
 /**
  * @addtogroup Eina_Core_Group Core
  *
index c3b7b0d..ec7bf5a 100644 (file)
@@ -82,6 +82,9 @@
 
 #define EINA_MAGIC_STRBUF 0x98761250
 
+#define EINA_MAGIC_QUADTREE 0x98761251
+#define EINA_MAGIC_QUADTREE_ROOT 0x98761252
+#define EINA_MAGIC_QUADTREE_ITEM 0x98761253
 
 /* undef the following, we want out version */
 #undef FREE
index fad08fa..e219cf8 100644 (file)
@@ -38,7 +38,8 @@ eina_tiler.c \
 eina_hamster.c \
 eina_safety_checks.c \
 eina_str.c \
-eina_strbuf.c
+eina_strbuf.c \
+eina_quadtree.c
 
 if EINA_STATIC_BUILD_CHAINED_POOL
 base_sources += $(top_srcdir)/src/modules/mp/chained_pool/eina_chained_mempool.c
index 2476697..2c19712 100644 (file)
@@ -100,6 +100,7 @@ S(counter);
 S(benchmark);
 S(rectangle);
 S(strbuf);
+S(quadtree);
 #undef S
 
 struct eina_desc_setup
@@ -127,7 +128,8 @@ static const struct eina_desc_setup _eina_desc_setup[] = {
   S(counter),
   S(benchmark),
   S(rectangle),
-  S(strbuf)
+  S(strbuf),
+  S(quadtree)
 #undef S
 };
 static const size_t _eina_desc_setup_len = sizeof(_eina_desc_setup) / sizeof(_eina_desc_setup[0]);
index b94570c..4c3f8c0 100644 (file)
@@ -56,7 +56,8 @@ eina_test_list.c      \
 eina_test_matrixsparse.c \
 eina_test_tiler.c       \
 eina_test_strbuf.c     \
-eina_test_str.c
+eina_test_str.c                \
+eina_test_quadtree.c
 
 eina_suite_LDADD = @CHECK_LIBS@ $(top_builddir)/src/lib/libeina.la
 
@@ -94,7 +95,8 @@ evas_hash.c \
 evas_list.c \
 evas_mempool.c \
 evas_object_list.c \
-evas_stringshare.c
+evas_stringshare.c \
+eina_bench_quad.c
 
 eina_bench_LDADD = @GLIB_LIBS@ $(top_builddir)/src/lib/libeina.la
 
index fdb76be..1371a7f 100644 (file)
@@ -42,6 +42,7 @@ static const Eina_Benchmark_Case etc[] = {
   { "Sort", eina_bench_sort },
   { "Mempool", eina_bench_mempool },
   { "Rectangle_Pool", eina_bench_rectangle_pool },
+  { "Render Loop", eina_bench_quadtree },
   { NULL, NULL }
 };
 
index f79a6e0..d575822 100644 (file)
@@ -28,6 +28,7 @@ void eina_bench_convert(Eina_Benchmark *bench);
 void eina_bench_sort(Eina_Benchmark *bench);
 void eina_bench_mempool(Eina_Benchmark *bench);
 void eina_bench_rectangle_pool(Eina_Benchmark *bench);
+void eina_bench_quadtree(Eina_Benchmark *bench);
 
 /* Specific benchmark. */
 void eina_bench_e17(void);
index 8a51db2..53af95d 100644 (file)
@@ -58,6 +58,7 @@ static const Eina_Test_Case etc[] = {
   { "Eina Tiler", eina_test_tiler },
   { "Eina Strbuf", eina_test_strbuf },
   { "String", eina_test_str },
+  { "QuadTree", eina_test_quadtree },
   { NULL, NULL }
 };
 
index 3b1b884..9de0dab 100644 (file)
@@ -45,5 +45,7 @@ void eina_test_matrixsparse(TCase *tc);
 void eina_test_tiler(TCase *tc);
 void eina_test_strbuf(TCase *tc);
 void eina_test_str(TCase *tc);
+void eina_test_quadtree(TCase *tc);
+void eina_test_fp(TCase *tc);
 
 #endif /* EINA_SUITE_H_ */