From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26520 invoked by alias); 22 May 2008 08:02:19 -0000 Received: (qmail 26506 invoked by uid 22791); 22 May 2008 08:02:18 -0000 X-Spam-Check-By: sourceware.org Received: from mail.network-theory.co.uk (HELO mail.network-theory.co.uk) (66.199.228.187) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 22 May 2008 08:02:01 +0000 Date: Thu, 22 May 2008 08:02:00 -0000 Message-ID: <87mymi937v.wl%bjg@network-theory.co.uk> From: Brian Gough To: "Alxneit-Kamber Ivo" Cc: Subject: Re: RFC bit_vectors In-Reply-To: <1211361194.31910.9.camel@pc6411.psi.ch> References: <1211361194.31910.9.camel@pc6411.psi.ch> User-Agent: Wanderlust/2.14.0 (Africa) Emacs/22.1 Mule/5.0 (SAKAKI) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Message-Mac: b2eebd090fdabc8e67e691fff479d0af Mailing-List: contact gsl-discuss-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gsl-discuss-owner@sourceware.org X-SW-Source: 2008-q2/txt/msg00026.txt.bz2 At Wed, 21 May 2008 11:13:14 +0200, Alxneit-Kamber Ivo wrote: > attached please find an implementation of 'bit_vectors' (maybe bit > fields would be a better name) that might be an interesting addition to > GSL. 'bit_vectors' can be used similarly like a C bit field, only that > they grow and shrink dynamically depending on the number of bits in use. > Currently the user is limited to 'maximum(size_t)' bits (the bit number > is passed as size_t) or by the amount of memory available. Note, > however, that memory for all bits does not necessarily need to be > allocated because high bits that are either all 1 or 0 are stored as a > single implied bit. Hello, Did you have a specific use in mind? This is probably more suited to a general C library rather than scientific library. -- Brian Gough