Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1NhPjJ-00054W-Hy for mharc-grub-devel@gnu.org; Tue, 16 Feb 2010 10:52:53 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NhPjH-000534-Ks for grub-devel@gnu.org; Tue, 16 Feb 2010 10:52:51 -0500 Received: from [140.186.70.92] (port=39753 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NhPjG-00052E-Kx for grub-devel@gnu.org; Tue, 16 Feb 2010 10:52:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NhPjF-0006rT-Pp for grub-devel@gnu.org; Tue, 16 Feb 2010 10:52:50 -0500 Received: from mail-bw0-f219.google.com ([209.85.218.219]:60180) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NhPjF-0006rJ-KG for grub-devel@gnu.org; Tue, 16 Feb 2010 10:52:49 -0500 Received: by bwz19 with SMTP id 19so4051888bwz.8 for ; Tue, 16 Feb 2010 07:52:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:from:date:x-google-sender-auth:message-id:subject:to :content-type:content-transfer-encoding; bh=fB2uzihj7bhFo3r+Qz9Tx5u+jk4gYu5uge9oI2Av/rE=; b=XSsghMfG+FG/CIuwXc2TG19V8DMnCi4Wo6JVVlnOOnXd9u7e6YD1eMLvFNs16UjHzW 9MKV8GsvDitgrjUfLWGz+Ng07z/Pi+v7p54aJ/Zu6aQlxi3S9GYlYjc8D4tRczLNC6Tf iLMn81DOUVDXpDB6gLqveuSf57/Q+uo1zsTBQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:content-type :content-transfer-encoding; b=e4bAXwRk4WKVcFJSd7H2aWWpueU4F40Xv1kSxAqfFpfEcd8jLxhRDDAhZlXtqaj+3U +aLa39wSeOkNMRPYftV6BBm/XBr2jbv8pp/+WVdoiPaGeOIByAPW7ADANrzQ6L2VnF5s 8regXIPtoenTTP3nr8qbjZy/GOy849THr0mBo= MIME-Version: 1.0 Sender: hramrach@gmail.com Received: by 10.239.184.82 with SMTP id x18mr664045hbg.67.1266335568189; Tue, 16 Feb 2010 07:52:48 -0800 (PST) In-Reply-To: <4B7A9075.9050400@gmail.com> References: <4B736F82.7010005@gmail.com> <4B742B70.3080303@gmail.com> <4B7A9075.9050400@gmail.com> From: Michal Suchanek Date: Tue, 16 Feb 2010 16:52:28 +0100 X-Google-Sender-Auth: d58deb13f0d7ce71 Message-ID: To: The development of GNU GRUB Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) Subject: Re: [RFC] Framebuffer rotation patch X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2010 15:52:51 -0000 2010/2/16 Vladimir '=CF=86-coder/phcoder' Serbinenko : > Michal Suchanek wrote: >> 2010/2/11 Vladimir '=CF=86-coder/phcoder' Serbinenko = : >> >>> Michal Suchanek wrote: >> This requires that both u and w be in the chosen set of generators >> because otherwise use of v or s twice is required to get one from the >> other. Using (u or w) and v as the two basic operations additionally >> requires composing generators in non-fixed order to get all the 8 >> possible combinations. >> >> The other reason for having 3 generators is clear and efficient >> reperesentation of the 8 possible transformations. They are >> represented as bits in the bitmap where each bit specifies if the >> particular basic transform is included or not but they are always >> applied in fixed order and at most once. >> >> Compare this to your representation of s^k,s^k*t where k is 0..3. >> Depending on representation the composition and inversion rules might >> still be somewhat non-trivial in actual code, using two reflections >> which require multiple applications of the two generators in >> particular order would lead to even more "interesting" code. >> >> > You don't have to use same representation through whole code I don't see any benefit in changing it and it would make the code harder to understand. >>>> >>> enum my_bitfield >>> { >>> =C2=A0MY_BITFIELD_NONE=3D0, >>> =C2=A0MY_BITFIELD_BIT0 =3D 1 << 0, >>> =C2=A0MY_BITFIELD_BIT1 =3D 1 << 1, >>> =C2=A0MY_BITFIELD_BIT2 =3D 1 << 2 >>> }; >>> >> >> The whole point of a bitfield is to have values like >> MY_BITFIELD_1_AND_2 =3D MY_BITFIELD_BIT1 | MY_BITFIELD_BIT2 which enum >> does not allow. >> > enum allows it just fine Not here: typedef enum t1 { BTI1 =3D 1, BIT2 =3D 2, BIT12 =3D BIT1 + BIT2} t; int main(int argc, char** argv) { return 0 ; } testenum.c:3: error: =E2=80=98BIT1=E2=80=99 undeclared here (not in a funct= ion) Thanks Michal