Boost logo

Boost :

Subject: Re: [boost] GIL io_new review
From: Domagoj Saric (domagoj.saric_at_[hidden])
Date: 2011-01-14 09:16:03


"Mateusz Loskot" <mateusz_at_[hidden]> wrote in message
news:4D06B2C7.4030604_at_loskot.net...
> On 13/12/10 17:53, Mateusz Loskot wrote:
>> I'm going to run your benchmark and submit my results here
>> https://github.com/mloskot/workshop/tree/master/benchmarking/tiling/gil
>> but I'm missing some details about how to configure and build it.
>> Can I find it anywhere?
>
> Domagoj,
>
> As far as I can see, implementation of your extension is Windows/Visual
> C++-specific, so I'm not really able to do anything to run it on Linux
> at this moment.

Hi Mateusz,

I've finally cleaned up io2 to compile on *NIXes (test with GCC 4.2.1, GCC
4.6, Apple Clang 1.6 and Clang 2.8) and I've added low level access routines
(what Phil was asking for).
All backends support scanline/row based access (even if emulated, as in the
case of WIC and GDI+), and the LibTIFF backend additionally supports tile
based access...

These low level access routines expect the caller to know what he/she is
doing and perform no checks or conversions...A supplementary set of member
functions and metafunctions was added for this purpose (to query image
information before you start low level access), such as
can_do_tile_access(), format(), get_native_format<> ... I'll explain it in
more detail in another post...

Anyways the LibTIFF tile based access can now be used to rewrite my original
benchmark code so that you can run it on a *NIX machine...

Here's the code: http://codepad.org/bKHEWPKb

On a weak Mac Mini with OS X 10.6.6 [a Core (1) Duo_at_1.8GHz, 1GB RAM (~640MB
of which is eaten by the OS) and a slow, small and uber fragmented disk]
this finishes in ~34 seconds...

On a Windows 7 Core 2 Duo_at_3.2Ghz + 4GB RAM + el-cheapo RAID 5 setup it
finishes in ~16 seconds (~33 seconds on the first run while nothing is in
cache)...

Configuration:
OSX:
 - everything built with Clang 2.8 -m32 -O4
(-flto) -DNDEBUG -msse -ffast-math
 - static linking except with libstc++
 - libs: LibTIFF 3.9.2, LibJPEG 8b, zlib 1.2.4
Win7
 - everything built with MSVC++ 10 x86 /Ox /Ob2 /Oi /Ot /Oy /GL /GF /MT /GS-
/Gy /arch:SSE /fp:fast /DNDEBUG
- static linking
- libs: LibTIFF 3.9.4, LibJPEG 8a, zlib 1.2.5

-- 
"What Huxley teaches is that in the age of advanced technology, spiritual
devastation is more likely to come from an enemy with a smiling face than
from one whose countenance exudes suspicion and hate."
Neil Postman 

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk