X-Account-Key: account1
X-UIDL: 336c0c18835ea6b9d2ed78cdc52dc199
X-Mozilla-Status: 0011
X-Mozilla-Status2: 00000000
X-Mozilla-Keys:                                                                                 
Received: from lists.maptools.org (lothlorien.howardsilvan.com [127.0.0.1])
	by mail.howardsilvan.com (Postfix) with ESMTPS id E4A6D672143
	for <faxguy@howardsilvan.com>; Tue, 26 Jan 2016 01:15:56 -0800 (PST)
Received: from lists.maptools.org ([94.23.4.142] helo=lists.maptools.org)
	by lothlorien.howardsilvan.com
	with SMTP (2.3.3); 26 Jan 2016	01:15:56 -0800
Received: from [10.1.0.241] (localhost.localdomain [127.0.0.1])
	by lists.maptools.org (Postfix) with ESMTP id 53E5B35C1F3;
	Tue, 26 Jan 2016 04:13:49 -0500 (EST)
Received: from mail-wm0-f50.google.com (mail-wm0-f50.google.com [74.125.82.50])
	by lists.maptools.org (Postfix) with ESMTPS id 071B935C1E3
	for <tiff@lists.maptools.org>; Tue, 26 Jan 2016 04:13:33 -0500 (EST)
Received: by mail-wm0-f50.google.com with SMTP id n5so119264161wmn.0
	for <tiff@lists.maptools.org>; Tue, 26 Jan 2016 01:13:33 -0800 (PST)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;	d=1e100.net;
 s=20130820;
	h=x-gm-message-state:mime-version:in-reply-to:references:from:date
	:message-id:subject:cc:content-type;
	bh=/auIN7TwHEJem6foAKY5OwwS/Xe63IJ+YPLlgaSmoFA=;
	b=NFKGD3cf0ofqgS0oqEDAQbcGdG1aD8i3i0HE6c/IPiCMJCsiODoIi0w3neiXCSbH/f
	cq9hK0XwiwEuK4yuDqgpgDLcJwaC9rjoIKejKWcYi5PSjic5nIunNxlMKxOdossiTGH8
	y2F8apiIt4WWPnGtn0QmtyIad3ZcJPd2KfH5BX4QSY1fdYmiERzBFOTnp3mgvtTMWwcw
	mNwxjXqxUa51J46ZOA4dSlC4/JwE536lOrVPfO2z6gbG3W0hqJBtbEVzxZV5eAAaY4eq
	osCJynE9X1hMP39zzpBxfzYUQqSYSFk3xc4oKjggWl+BOgMFOo84A89PNT+va8WGYW8R	jvbA==
X-Gm-Message-State: 
 AG10YOSxIlQiEd0UcYnIqw7/VuPtBA8DZz3CKuMwBQRA0Y1r0+FPkXeIyFEkiCFFH6nT0jxJC3w
	9gNAHRlkV2Q==
X-Received: by 10.28.52.195 with SMTP id b186mr22465074wma.40.1453799612762;
	Tue, 26 Jan 2016 01:13:32 -0800 (PST)
MIME-Version: 1.0
Received: by 10.194.107.129 with HTTP; Tue, 26 Jan 2016 01:12:53 -0800 (PST)
In-Reply-To: 
 <CAK8GPyAzKfkxRzoG9BSLMT6WS1+pOuD5-cn08huFevXBAM9Y3g@mail.gmail.com>
References:
	<CAK8GPyAzKfkxRzoG9BSLMT6WS1+pOuD5-cn08huFevXBAM9Y3g@mail.gmail.com>
From: jcupitt@gmail.com
Date: Tue, 26 Jan 2016 09:12:53 +0000
Message-ID: <CAGNS0RtXiz0qPgEuXpzVwJGvbv7TACX2JD-quMi_urwo7P05HA@mail.gmail.com>
Cc: TIFF mailing list <tiff@lists.maptools.org>
Subject: Re: [Tiff] OpenMP enabled libtiff
X-BeenThere: tiff@lists.maptools.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: TIFF and libtiff discussion <tiff.lists.maptools.org>
List-Unsubscribe: <http://lists.maptools.org/mailman/listinfo/tiff>,
	<mailto:tiff-request@lists.maptools.org?subject=unsubscribe>
List-Archive: <http://lists.maptools.org/mailman/private/tiff>
List-Post: <mailto:tiff@lists.maptools.org>
List-Help: <mailto:tiff-request@lists.maptools.org?subject=help>
List-Subscribe: <http://lists.maptools.org/mailman/listinfo/tiff>,
	<mailto:tiff-request@lists.maptools.org?subject=subscribe>
Sender: tiff-bounces@lists.maptools.org
Errors-To: tiff-bounces@lists.maptools.org
X-Assp-ID: lothlorien.howardsilvan.com m1-99756-09159
X-Assp-Session: 208CD630 (mail 1)
X-Assp-Detected-RIP: 74.125.82.50
X-Assp-Source-IP: 74.125.82.50
X-Assp-Envelope-From: tiff-bounces@lists.maptools.org
X-Assp-Intended-For: faxguy@howardsilvan.com
X-Assp-Version: 2.3.3(14029) on lothlorien.howardsilvan.com
X-Assp-Server-TLS: yes
X-Assp-Delay: not delayed (whitelisted); 26 Jan 2016 01:15:56 -0800
X-Assp-Whitelisted: Yes (whitelistdb)
X-Assp-DKIM: not verified
Return-Path: tiff-bounces@lists.maptools.org
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

On 25 January 2016 at 18:25, Aaron Boxer <boxerab@gmail.com> wrote:
> Is anyone interested in having OpenMP support in libtiff ?
> Is this feasible?  I am planning on adding this feature for another project
> I am working on, so I am trying to gauge interest.

I think I would not add openmp support directly. Scattered reads and
writes are too difficult to support efficiently with the current
structure.

Instead, as Bob said, I think I would split the library in two. Have a
very low level interface which just reads or writes compressed strips
or tiles, essentially just a thin wrapper around the read() and
write() system calls, and then have a higher layer to do compression,
decompression, packing and unpacking. The low-level read/write layer
should be single-threaded, the higher layer should be threadsafe.

Now you can serialize read/write to match the disc structure, but the
application can use SMP in whatever framework it prefers to accelerate
the CPU-intensive parts.

Uncompressed tiffs already work rather like this: if you call
TIFFReadEncodedStrip() on an uncompressed image, it's just a few
function calls around read() --- it's very easy to saturate any disc
system. We just need to move the decompress stage outside the serial
code path.

John
_______________________________________________
Tiff mailing list: Tiff@lists.maptools.org
http://lists.maptools.org/mailman/listinfo/tiff
http://www.remotesensing.org/libtiff/


