Commit 3a881634 authored by Roland Levillain's avatar Roland Levillain
Browse files

Start a micro benchmark about generic vs non-generic code.

	* apps/bench/gradient-lena.cc,
	* apps/bench/Makefile.am:
	New.
parent bb4a0447
2011-01-10 Roland Levillain <roland@lrde.epita.fr>
Start a micro benchmark about generic vs non-generic code.
* apps/bench/gradient-lena.cc,
* apps/bench/Makefile.am:
New.
2013-10-25 Roland Levillain <roland@lrde.epita.fr>
 
Milena: Exercise mln::interpolated, mln::tr_image and mln::compose.
# Copyright (C) 2010 EPITA Research and Development Laboratory (LRDE).
#
# This file is part of Olena.
#
# Olena is free software: you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free
# Software Foundation, version 2 of the License.
#
# Olena is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Olena. If not, see <http://www.gnu.org/licenses/>.
include $(top_srcdir)/milena/apps/apps.mk
noinst_PROGRAMS = \
gradient-lena
MOSTLYCLEANFILES = \
gradient-lena-out.pgm
// Copyright (C) 2007, 2008, 2009, 2010 EPITA Research and Development
// Laboratory (LRDE)
//
// This file is part of Olena.
//
// Olena is free software: you can redistribute it and/or modify it under
// the terms of the GNU General Public License as published by the Free
// Software Foundation, version 2 of the License.
//
// Olena is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Olena. If not, see <http://www.gnu.org/licenses/>.
//
// As a special exception, you may use this file as part of a free
// software project without restriction. Specifically, if other files
// instantiate templates or use macros or inline functions from this
// file, or you compile this file and link it with other files to produce
// an executable, this file does not by itself cause the resulting
// executable to be covered by the GNU General Public License. This
// exception does not however invalidate any other reasons why the
// executable file might be covered by the GNU General Public License.
#include <iostream>
#include <mln/core/image/image2d.hh>
#include <mln/core/alias/window2d.hh>
#include <mln/io/pgm/load.hh>
#include <mln/io/pgm/save.hh>
#include <mln/value/int_u8.hh>
#include <mln/morpho/gradient.hh>
#include <mln/util/timer.hh>
#include "apps/data.hh"
int main()
{
using namespace mln;
using value::int_u8;
border::thickness = 1;
image2d<int_u8> lena;
io::pgm::load(lena, MLN_IMG_DIR "/lena.pgm");
util::timer t;
t.start();
image2d<int_u8> g = morpho::gradient(lena, win_c4p());
t.stop();
std::cout << t.read() << std::endl;
io::pgm::save(g, "gradient-lena-out.pgm");
}
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