Commit caafe275 authored by Roland Levillain's avatar Roland Levillain
Browse files

tools: s/simple_point_3d/simple_point3d/.

	* tools/simple_point_3d_lut.cc,
	* tools/simple_point_3d_lut.hh,
	* tools/simple_point_3d_lut_tbb.hh:
	Rename as...
	* tools/simple_point3d_lut.cc,
	* tools/simple_point3d_lut.hh,
	* tools/simple_point3d_lut_tbb.hh:
	...these.
	* tools/Makefile.am: s/simple_point_3d/simple_point3d/.
parent fd81df40
2011-06-15 Roland Levillain <roland@lrde.epita.fr>
tools: s/simple_point_3d/simple_point3d/.
* tools/simple_point_3d_lut.cc,
* tools/simple_point_3d_lut.hh,
* tools/simple_point_3d_lut_tbb.hh:
Rename as...
* tools/simple_point3d_lut.cc,
* tools/simple_point3d_lut.hh,
* tools/simple_point3d_lut_tbb.hh:
...these.
* tools/Makefile.am: s/simple_point_3d/simple_point3d/.
2011-06-14 Roland Levillain <roland@lrde.epita.fr>
 
New app: apps/generic-skel/image3d-skel-unconstrained.
......@@ -43,33 +43,33 @@ connectivity_numbers_3d_tbb_SOURCES = connectivity_numbers_3d_tbb.cc
connectivity_numbers_3d_tbb_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_TBB)
connectivity_numbers_3d_tbb_LDFLAGS = $(LDFLAGS_TBB)
noinst_HEADERS += simple_point_3d_lut.hh
EXTRA_PROGRAMS += simple_point_3d_lut
simple_point_3d_lut_SOURCES = simple_point_3d_lut.cc
noinst_HEADERS += simple_point3d_lut.hh
EXTRA_PROGRAMS += simple_point3d_lut
simple_point3d_lut_SOURCES = simple_point3d_lut.cc
noinst_HEADERS += simple_point_3d_lut_tbb.hh
EXTRA_PROGRAMS += simple_point_3d_lut_tbb
simple_point_3d_lut_tbb_SOURCES = simple_point_3d_lut_tbb.cc
simple_point_3d_lut_tbb_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_TBB)
simple_point_3d_lut_tbb_LDFLAGS = $(LDFLAGS_TBB)
noinst_HEADERS += simple_point3d_lut_tbb.hh
EXTRA_PROGRAMS += simple_point3d_lut_tbb
simple_point3d_lut_tbb_SOURCES = simple_point3d_lut_tbb.cc
simple_point3d_lut_tbb_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_TBB)
simple_point3d_lut_tbb_LDFLAGS = $(LDFLAGS_TBB)
# Simple point look-up tables (LUTs).
.PHONY: simple_point_luts
simple_point_luts: simple_point_3d_lut_26_6.hh
simple_point_luts: simple_point3d_lut_26_6.hh
CLEANFILES = simple_point_3d_lut_26_6.txt
CLEANFILES = simple_point3d_lut_26_6.txt
# Careful, there is no dependency on the generator (on purpose,
# because regenerating these files takes time).
simple_point_3d_lut_26_6.txt:
./simple_point_3d_lut_tbb$(EXEEXT) 26_6 >$@
simple_point3d_lut_26_6.txt:
./simple_point3d_lut_tbb$(EXEEXT) 26_6 >$@
CLEANFILES += simple_point_3d_lut_26_6.hh
CLEANFILES += simple_point3d_lut_26_6.hh
## FIXME: Add copyright headers, guards and documentation (and
## declaration/definition separation). It may be a good idea to move
## the action of this target into own file (outside this Makefile).
# The sed scripts remove the last (empty) line as well as the last
# comma, and add some identation.
simple_point_3d_lut_26_6.hh: simple_point_3d_lut_26_6.txt
simple_point3d_lut_26_6.hh: simple_point3d_lut_26_6.txt
rm -f $@.tmp
{ \
set -e; \
......
......@@ -26,7 +26,7 @@
/// \brief Compute a compressed look-up table (LUT) showing whether a
/// 3D point is simple or not.
#include "simple_point_3d_lut.hh"
#include "simple_point3d_lut.hh"
int
main(int argc, char* argv[])
......@@ -36,10 +36,10 @@ main(int argc, char* argv[])
std::string nbhs = argv[1];
simple_point_lut_t simple_point_lut;
if (nbhs == "6_26") simple_point_lut = simple_point_3d_lut__6_26();
else if (nbhs == "26_6") simple_point_lut = simple_point_3d_lut__26_6();
else if (nbhs == "6p_18") simple_point_lut = simple_point_3d_lut__6p_18();
else if (nbhs == "18_6p") simple_point_lut = simple_point_3d_lut__18_6p();
if (nbhs == "6_26") simple_point_lut = simple_point3d_lut__6_26();
else if (nbhs == "26_6") simple_point_lut = simple_point3d_lut__26_6();
else if (nbhs == "6p_18") simple_point_lut = simple_point3d_lut__6p_18();
else if (nbhs == "18_6p") simple_point_lut = simple_point3d_lut__18_6p();
else
usage(argv[0]);
......
......@@ -26,8 +26,8 @@
/// \brief Elements to compute a look-up table (LUT) showing whether a
/// 3D point is simple or not.
#ifndef TOOLS_SIMPLE_POINT_3D_LUT_HH
# define TOOLS_SIMPLE_POINT_3D_LUT_HH
#ifndef TOOLS_SIMPLE_POINT3D_LUT_HH
# define TOOLS_SIMPLE_POINT3D_LUT_HH
#include "connectivity_numbers_3d.hh"
......@@ -52,7 +52,7 @@ typedef std::vector<bool> simple_point_lut_t;
/// background.
template <typename FG, typename BG>
simple_point_lut_t
simple_point_3d_lut(FG fg_fun, BG bg_fun)
simple_point3d_lut(FG fg_fun, BG bg_fun)
{
using namespace mln;
......@@ -106,10 +106,10 @@ simple_point_3d_lut(FG fg_fun, BG bg_fun)
`-------------------------------------------------------------*/
simple_point_lut_t
simple_point_3d_lut__6_26()
simple_point3d_lut__6_26()
{
return simple_point_3d_lut(connectivity_number_3d__6_26_one,
connectivity_number_3d__26_6_one);
return simple_point3d_lut(connectivity_number_3d__6_26_one,
connectivity_number_3d__26_6_one);
}
......@@ -119,10 +119,10 @@ simple_point_3d_lut__6_26()
`-------------------------------------------------------------*/
simple_point_lut_t
simple_point_3d_lut__26_6()
simple_point3d_lut__26_6()
{
return simple_point_3d_lut(connectivity_number_3d__26_6_one,
connectivity_number_3d__6_26_one);
return simple_point3d_lut(connectivity_number_3d__26_6_one,
connectivity_number_3d__6_26_one);
}
......@@ -132,10 +132,10 @@ simple_point_3d_lut__26_6()
`---------------------------------------------------------------*/
simple_point_lut_t
simple_point_3d_lut__6p_18()
simple_point3d_lut__6p_18()
{
return simple_point_3d_lut(connectivity_number_3d__6p_18_one,
connectivity_number_3d__18_6p_one);
return simple_point3d_lut(connectivity_number_3d__6p_18_one,
connectivity_number_3d__18_6p_one);
}
......@@ -145,10 +145,10 @@ simple_point_3d_lut__6p_18()
`---------------------------------------------------------------*/
simple_point_lut_t
simple_point_3d_lut__18_6p()
simple_point3d_lut__18_6p()
{
return simple_point_3d_lut(connectivity_number_3d__18_6p_one,
connectivity_number_3d__6p_18_one);
return simple_point3d_lut(connectivity_number_3d__18_6p_one,
connectivity_number_3d__6p_18_one);
}
/*----------------------.
......@@ -187,4 +187,4 @@ display_simple_point_lut(const simple_point_lut_t& simple_point_lut)
}
}
#endif // ! TOOLS_SIMPLE_POINT_3D_LUT_HH
#endif // ! TOOLS_SIMPLE_POINT3D_LUT_HH
......@@ -26,13 +26,13 @@
/// \brief Elements to compute a look-up table (LUT) showing whether a
/// 3D point is simple or not.
#ifndef TOOLS_SIMPLE_POINT_3D_LUT_TBB_HH
# define TOOLS_SIMPLE_POINT_3D_LUT_TBB_HH
#ifndef TOOLS_SIMPLE_POINT3D_LUT_TBB_HH
# define TOOLS_SIMPLE_POINT3D_LUT_TBB_HH
#include <tbb/blocked_range.h>
#include <tbb/parallel_for.h>
#include "simple_point_3d_lut.hh"
#include "simple_point3d_lut.hh"
/*-------------------------------------------------------------------.
......@@ -42,11 +42,11 @@
// The core of the loop within connectivity_numbers_3d_tbb below.
template <typename FG, typename BG>
struct simple_point_3d_lut_tbb_range
struct simple_point3d_lut_tbb_range
{
typedef mln::neighb3d N;
simple_point_3d_lut_tbb_range(FG fg_fun, BG bg_fun, const N& nbh,
simple_point3d_lut_tbb_range(FG fg_fun, BG bg_fun, const N& nbh,
simple_point_lut_t& simple_point_lut)
: fg_fun_(fg_fun), bg_fun_(bg_fun), nbh_(nbh),
simple_point_lut_(simple_point_lut)
......@@ -115,9 +115,9 @@ private:
/// background.
template <typename FG, typename BG>
simple_point_lut_t
simple_point_3d_lut_tbb(FG fg_fun, BG bg_fun)
simple_point3d_lut_tbb(FG fg_fun, BG bg_fun)
{
// FIXME: Code duplicated from simple_point_3d_lut_tbb_range.
// FIXME: Code duplicated from simple_point3d_lut_tbb_range.
const unsigned dim = 3;
const unsigned max_nneighbs = mlc_pow_int(3, dim) - 1;
const unsigned nconfigs = mlc_pow_int(2, max_nneighbs);
......@@ -127,7 +127,7 @@ simple_point_3d_lut_tbb(FG fg_fun, BG bg_fun)
simple_point_lut_t simple_point_lut(nconfigs, false);
tbb::parallel_for(tbb::blocked_range<config_3d_t>(0, nconfigs),
simple_point_3d_lut_tbb_range<FG, BG>(fg_fun, bg_fun,
simple_point3d_lut_tbb_range<FG, BG>(fg_fun, bg_fun,
nbh,
simple_point_lut));
......@@ -141,10 +141,10 @@ simple_point_3d_lut_tbb(FG fg_fun, BG bg_fun)
`-------------------------------------------------------------*/
simple_point_lut_t
simple_point_3d_lut_tbb__6_26()
simple_point3d_lut_tbb__6_26()
{
return simple_point_3d_lut_tbb(connectivity_number_3d__6_26_one,
connectivity_number_3d__26_6_one);
return simple_point3d_lut_tbb(connectivity_number_3d__6_26_one,
connectivity_number_3d__26_6_one);
}
......@@ -154,10 +154,10 @@ simple_point_3d_lut_tbb__6_26()
`-------------------------------------------------------------*/
simple_point_lut_t
simple_point_3d_lut_tbb__26_6()
simple_point3d_lut_tbb__26_6()
{
return simple_point_3d_lut_tbb(connectivity_number_3d__26_6_one,
connectivity_number_3d__6_26_one);
return simple_point3d_lut_tbb(connectivity_number_3d__26_6_one,
connectivity_number_3d__6_26_one);
}
......@@ -167,10 +167,10 @@ simple_point_3d_lut_tbb__26_6()
`---------------------------------------------------------------*/
simple_point_lut_t
simple_point_3d_lut_tbb__6p_18()
simple_point3d_lut_tbb__6p_18()
{
return simple_point_3d_lut_tbb(connectivity_number_3d__6p_18_one,
connectivity_number_3d__18_6p_one);
return simple_point3d_lut_tbb(connectivity_number_3d__6p_18_one,
connectivity_number_3d__18_6p_one);
}
......@@ -180,10 +180,10 @@ simple_point_3d_lut_tbb__6p_18()
`---------------------------------------------------------------*/
simple_point_lut_t
simple_point_3d_lut_tbb__18_6p()
simple_point3d_lut_tbb__18_6p()
{
return simple_point_3d_lut_tbb(connectivity_number_3d__18_6p_one,
connectivity_number_3d__6p_18_one);
return simple_point3d_lut_tbb(connectivity_number_3d__18_6p_one,
connectivity_number_3d__6p_18_one);
}
#endif // ! TOOLS_SIMPLE_POINT_3D_LUT_TBB_HH
#endif // ! TOOLS_SIMPLE_POINT3D_LUT_TBB_HH
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment