You can subscribe to this list here.
2000 
_{Jan}

_{Feb}

_{Mar}

_{Apr}

_{May}

_{Jun}

_{Jul}
(390) 
_{Aug}
(767) 
_{Sep}
(940) 
_{Oct}
(964) 
_{Nov}
(819) 
_{Dec}
(762) 

2001 
_{Jan}
(680) 
_{Feb}
(1075) 
_{Mar}
(954) 
_{Apr}
(595) 
_{May}
(725) 
_{Jun}
(868) 
_{Jul}
(678) 
_{Aug}
(785) 
_{Sep}
(410) 
_{Oct}
(395) 
_{Nov}
(374) 
_{Dec}
(419) 
2002 
_{Jan}
(699) 
_{Feb}
(501) 
_{Mar}
(311) 
_{Apr}
(334) 
_{May}
(501) 
_{Jun}
(507) 
_{Jul}
(441) 
_{Aug}
(395) 
_{Sep}
(540) 
_{Oct}
(416) 
_{Nov}
(369) 
_{Dec}
(373) 
2003 
_{Jan}
(514) 
_{Feb}
(488) 
_{Mar}
(396) 
_{Apr}
(624) 
_{May}
(590) 
_{Jun}
(562) 
_{Jul}
(546) 
_{Aug}
(463) 
_{Sep}
(389) 
_{Oct}
(399) 
_{Nov}
(333) 
_{Dec}
(449) 
2004 
_{Jan}
(317) 
_{Feb}
(395) 
_{Mar}
(136) 
_{Apr}
(338) 
_{May}
(488) 
_{Jun}
(306) 
_{Jul}
(266) 
_{Aug}
(424) 
_{Sep}
(502) 
_{Oct}
(170) 
_{Nov}
(170) 
_{Dec}
(134) 
2005 
_{Jan}
(249) 
_{Feb}
(109) 
_{Mar}
(119) 
_{Apr}
(282) 
_{May}
(82) 
_{Jun}
(113) 
_{Jul}
(56) 
_{Aug}
(160) 
_{Sep}
(89) 
_{Oct}
(98) 
_{Nov}
(237) 
_{Dec}
(297) 
2006 
_{Jan}
(151) 
_{Feb}
(250) 
_{Mar}
(222) 
_{Apr}
(147) 
_{May}
(266) 
_{Jun}
(313) 
_{Jul}
(367) 
_{Aug}
(135) 
_{Sep}
(108) 
_{Oct}
(110) 
_{Nov}
(220) 
_{Dec}
(47) 
2007 
_{Jan}
(133) 
_{Feb}
(144) 
_{Mar}
(247) 
_{Apr}
(191) 
_{May}
(191) 
_{Jun}
(171) 
_{Jul}
(160) 
_{Aug}
(51) 
_{Sep}
(125) 
_{Oct}
(115) 
_{Nov}
(78) 
_{Dec}
(67) 
2008 
_{Jan}
(165) 
_{Feb}
(37) 
_{Mar}
(130) 
_{Apr}
(111) 
_{May}
(91) 
_{Jun}
(142) 
_{Jul}
(54) 
_{Aug}
(104) 
_{Sep}
(89) 
_{Oct}
(87) 
_{Nov}
(44) 
_{Dec}
(54) 
2009 
_{Jan}
(283) 
_{Feb}
(113) 
_{Mar}
(154) 
_{Apr}
(395) 
_{May}
(62) 
_{Jun}
(48) 
_{Jul}
(52) 
_{Aug}
(54) 
_{Sep}
(131) 
_{Oct}
(29) 
_{Nov}
(32) 
_{Dec}
(37) 
2010 
_{Jan}
(34) 
_{Feb}
(36) 
_{Mar}
(40) 
_{Apr}
(23) 
_{May}
(38) 
_{Jun}
(34) 
_{Jul}
(36) 
_{Aug}
(27) 
_{Sep}
(9) 
_{Oct}
(18) 
_{Nov}
(25) 
_{Dec}

2011 
_{Jan}
(1) 
_{Feb}
(14) 
_{Mar}
(1) 
_{Apr}
(5) 
_{May}
(1) 
_{Jun}

_{Jul}

_{Aug}
(37) 
_{Sep}
(6) 
_{Oct}
(2) 
_{Nov}

_{Dec}

2012 
_{Jan}

_{Feb}
(7) 
_{Mar}

_{Apr}
(4) 
_{May}

_{Jun}
(3) 
_{Jul}

_{Aug}

_{Sep}
(1) 
_{Oct}

_{Nov}

_{Dec}
(10) 
2013 
_{Jan}

_{Feb}
(1) 
_{Mar}
(7) 
_{Apr}
(2) 
_{May}

_{Jun}

_{Jul}
(9) 
_{Aug}

_{Sep}

_{Oct}

_{Nov}

_{Dec}

2014 
_{Jan}
(14) 
_{Feb}

_{Mar}
(2) 
_{Apr}

_{May}
(10) 
_{Jun}

_{Jul}

_{Aug}

_{Sep}

_{Oct}

_{Nov}
(3) 
_{Dec}

2015 
_{Jan}

_{Feb}

_{Mar}

_{Apr}

_{May}

_{Jun}

_{Jul}

_{Aug}

_{Sep}

_{Oct}
(12) 
_{Nov}

_{Dec}
(1) 
2016 
_{Jan}

_{Feb}
(1) 
_{Mar}
(1) 
_{Apr}
(1) 
_{May}

_{Jun}
(1) 
_{Jul}

_{Aug}
(1) 
_{Sep}

_{Oct}

_{Nov}

_{Dec}

2017 
_{Jan}

_{Feb}

_{Mar}

_{Apr}

_{May}

_{Jun}

_{Jul}
(1) 
_{Aug}

_{Sep}

_{Oct}

_{Nov}

_{Dec}

S  M  T  W  T  F  S 







1
(12) 
2
(5) 
3
(30) 
4
(13) 
5
(26) 
6
(37) 
7
(26) 
8
(24) 
9
(9) 
10
(34) 
11
(39) 
12
(16) 
13
(21) 
14
(27) 
15
(11) 
16
(2) 
17
(7) 
18
(6) 
19
(3) 
20
(15) 
21
(4) 
22

23

24
(6) 
25
(20) 
26
(32) 
27
(35) 
28
(28) 

From: Georg Fischer <gfischer@te...>  20030207 23:59:50

>How do you handle per pixel lighting (multi pass normal map, as an >example) on translucent surface? I haven't actually done it yet so I'm probably way off, but this is what I was planning on trying: Modulate the lighting with the diffuse texture per light, instead of accumulating all light contributions into the frame buffer and then modulating it with the texture. Might also need to do the first light with (SRC_ALPHA, INV_SRC_ALPHA) and the rest (SRC_ALPHA,ONE), or something like that. The drawback, except for being slower, is the result wouldn't be identical to "normal" lighting. There's probably a better way to this (if it even works), so I'm also very interested in what other people have to say about it :) 
From: Joe Ante <joeante@li...>  20030207 23:53:24

Hi Peter, > The standard way people solve this (as far as I know) is to just check for > faces flipping after the collapse (and not allowing it if this happens.) How exactly do I test for flipping after the collapse? > (I think the topological test might just be if the intersection of the 1 rings > of two vertices on the edge that is being collapsed contains vertices that > aren't on the face(s) that are going to be removed after the collapse the > resulting mesh would be nonmanifold. I believe hugues discusses this in his > thesis and Edelsbruner (sp?) has papers that discuss this as well... Ive not been able to find these papers, hoppes thesis seems to be availible only as ppt presentation. > So > basically the intersection of the 1 rings should have 4 vertices (3 if it's a > boundary edge.) Ah that sounds like a much simpler test, thanks. Are you sure that the intersection should be 4 vertices for non boundary edges? When I draw it on paper the 1ring intersection seems to be 3 for nonboundary and 2 for boundary edges when the edge will become nonmanifold. Joe ANte 
From: Corrinne Yu <corrinne@sp...>  20030207 22:36:34

How do you handle per pixel lighting (multi pass normal map, as an example) on translucent surface? 1. How do you resimulate the alpha blend mode translucency? 2. How do you z sort the per pixel lit translucent surface? The alpha clip method just breaks when the "source color" needs to be multiblended in the buffer. 3. How do you do it the fastest way possible (fewer repetitive passes, less fill, the passes themselves being faster passes, early reject, any accumulative ideas very welcome!). This is for D3D DX 9 (ish) implementation. Polling for clever ideas that would run fast on GeForce 4 class and thus while high HLSL version ideas are very welcome, preferably <= PS 1.1 or shader free (yeah I know it's hard and not worth the trouble :) ) solutions. Everything is much easier to design once shader levels are high enough (and if we can assume the hardware to do them for real are safe to target). Right now my method to correctly sort the alpha draw order of per pixel lit surfaces have more passes than I would like and also uses up some render (or pixel shader output) to textures, and would like to see if others are able to combine them into few passes and fewer "renders" (or calls to pixel shaders) or even a single pass! Thanks for any ideas. Still chugging away at optimization. P.S. Huge apologies to DX subscribers for the fact that I asked this question on DX. Please do not waste public bandwidth to publicly flaming this post. Feel free to flame privately. :) This applies to admin helpers as well. ;p I am just hoping to catch the small handful of alogers who are not on DX. 
From: PeterPike Sloan <ppsloan@mi...>  20030207 22:26:20

The standard way people solve this (as far as I know) is to just check = for faces flipping after the collapse (and not allowing it if this = happens.) PeterPike Sloan (I think the topological test might just be if the intersection of the 1 = rings of two vertices on the edge that is being collapsed contains = vertices that aren't on the face(s) that are going to be removed after = the collapse the resulting mesh would be nonmanifold. I believe hugues = discusses this in his thesis and Edelsbruner (sp?) has papers that = discuss this as well... So basically the intersection of the 1 rings = should have 4 vertices (3 if it's a boundary edge.) I've implimented it = this way before (purely topologically) but I don't think hugues does the = topological check (he discusses flipping in one of his papers.)) Original Message From: Joe Ante [mailto:joeante@...]=20 Sent: Friday, February 07, 2003 2:12 PM To: gdalgorithmslist@... Subject: [Algorithms] Edge collapse based simplification problem Hi, I have a quadric error metric based edge collapse simplification = algorithm. It can internally handle nonmanifold meshes. But my triangle = stripper can not. I would like to avoid generating manifold meshes = inside the simplification algorithm. The manfold mesh can be generated for example If you collapse the edge = on the left from the bottom to the upper vertex. You will end up with 2 = same triangles. X+ / \  / \  /  \  /  \  /  \  /  \  /  \  / / \\ \  / // \\ \  / // \ \  /// \\ \  // \\ \ /\\\ One could detect the case before doing the collapse by checking if there = is a vertex whose 1 ring vertices contains the collapse to and collapse = from vertex and are not on the same triangle. (In the example above this test would return true for the bottomright vertex.) I would like to avoid a test like this before doing collapses, since the = number of collapses that introduce these artifacts seems to be small so = fixing after it has happened should be faster. So I wonder if there is a way to do the edge collapse so that it = doesn=B9t introduce the nonmanifold triangles? Has anyone had similar problems, how did you solve it? Joe Ante=20  This SF.NET email is sponsored by: SourceForge Enterprise Edition + IBM + LinuxWorld =3Domething 2 See! = http://www.vasoftware.com = _______________________________________________ GDAlgorithmslist mailing list GDAlgorithmslist@... https://lists.sourceforge.net/lists/listinfo/gdalgorithmslist Archives: http://sourceforge.net/mailarchive/forum.php?forum_ida88 
From: Joe Ante <joeante@li...>  20030207 22:12:20

Hi, I have a quadric error metric based edge collapse simplification algorithm. It can internally handle nonmanifold meshes. But my triangle stripper can not. I would like to avoid generating manifold meshes inside the simplification algorithm. The manfold mesh can be generated for example If you collapse the edge on the left from the bottom to the upper vertex. You will end up with 2 same triangles. X+ / \  / \  /  \  /  \  /  \  /  \  /  \  / / \\ \  / // \\ \  / // \ \  /// \\ \  // \\ \ /\\\ One could detect the case before doing the collapse by checking if there is a vertex whose 1 ring vertices contains the collapse to and collapse from vertex and are not on the same triangle. (In the example above this test would return true for the bottomright vertex.) I would like to avoid a test like this before doing collapses, since the number of collapses that introduce these artifacts seems to be small so fixing after it has happened should be faster. So I wonder if there is a way to do the edge collapse so that it doesn=B9t introduce the nonmanifold triangles? Has anyone had similar problems, how did you solve it? Joe Ante=20 
From: Pierre Terdiman <p.terdiman@wa...>  20030207 17:45:06

inline int CodeSize(int value) { int n; *((float*)&n) =3D (float)value; n =3D (n>>23)126; return n; } (or something like that)  Original Message =20 From: Zafar Qamar=20 To: gdalgorithmslist@...=20 Sent: Friday, February 07, 2003 4:16 PM Subject: [Algorithms] Log2 using bitwise operators Hi, Does anyone know if it's possible to calculate how many bits are = required to store an integer, using simple operations (bitwise etc)? =20 Many thanks in advance, Zaf __________________________________________________________ This mail has been scanned for all known viruses by UUNET=20 delivered through the MessageLabs Virus Control Centre. 
From: Joakim Hagdahl <disc@ho...>  20030207 17:41:54

just imagine the possibilities :P  Original Message  From: "Gareth Lewin" <GLewin@...> To: <gdalgorithmslist@...> Sent: Friday, February 07, 2003 5:47 PM Subject: RE: [Algorithms] Log2 using bitwise operators > Surely that would be slow due to cache misses ? > > > What he means, is you allocate an array of 4 billion > > integers. Then in each integer, you calculate & store the > > log2 of the value. Then when you need to know the log2 of the > > value fast, you look it up in the array. > > > > :) > > Kidding ofcourse. > > >  > This SF.NET email is sponsored by: > SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! > http://www.vasoftware.com > _______________________________________________ > GDAlgorithmslist mailing list > GDAlgorithmslist@... > https://lists.sourceforge.net/lists/listinfo/gdalgorithmslist > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_id=6188 > 
From: Zafar Qamar <zafar.qamar@sw...>  20030207 16:49:32

After all of your kind response, these 2 seem to answer my question more than enough. <http://aggregate.org/MAGIC/#Log2%20of%20an%20Integer>; http://aggregate.org/MAGIC/#Log2%20of%20an%20Integer <http://www.flipcode.com/cgibin/msg.cgi?showThread=TipBitsCompileTime&foru m=totd&id=1> http://www.flipcode.com/cgibin/msg.cgi?showThread=TipBitsCompileTime&forum =totd&id=1 Thanks to everyone who responded. Zafar Original Message From: Jamie Fowlston [mailto:jamief@...] Sent: 07 February 2003 15:47 To: gdalgorithmslist@... Subject: RE: [Algorithms] Log2 using bitwise operators http://aggregate.org/MAGIC/#Log2%20of%20an%20Integer <http://aggregate.org/MAGIC/#Log2%20of%20an%20Integer>; jamie Original Message From: gdalgorithmslistadmin@... [mailto:gdalgorithmslistadmin@...]On Behalf Of Zafar Qamar Sent: 07 February 2003 15:17 To: gdalgorithmslist@... Subject: [Algorithms] Log2 using bitwise operators Hi, Does anyone know if it's possible to calculate how many bits are required to store an integer, using simple operations (bitwise etc)? Many thanks in advance, Zaf __________________________________________________________ This mail has been scanned for all known viruses by UUNET delivered through the MessageLabs Virus Control Centre. __________________________________________________________ This mail has been scanned for all known viruses by UUNET delivered through the MessageLabs Virus Control Centre. __________________________________________________________ This mail has been scanned for all known viruses by UUNET delivered through the MessageLabs Virus Control Centre. 
From: Gareth Lewin <GLewin@cl...>  20030207 16:47:25

Surely that would be slow due to cache misses ? > What he means, is you allocate an array of 4 billion > integers. Then in each integer, you calculate & store the > log2 of the value. Then when you need to know the log2 of the > value fast, you look it up in the array. > > :) Kidding ofcourse. 
From: Justin HeyesJones <justin.heyesjones@ge...>  20030207 16:43:20

Check out the chapter on implicit integration in Game Gems I. This is = better at handling springs than euler, and no need for adaptive step = size.  Original Message =20 From: Tom Lowe=20 To: gdalgorithmslist@...=20 Sent: Friday, February 07, 2003 12:23 AM Subject: Re: [Algorithms] Euler's integration >Tom, >I don't get the point and what you meant by telling Euler's = integration gives more responsive position >change. >If you retake the context which is to have a set of forces applied to = a body in a time's interval, the kinetic >of >this body is just perfectly defined by the Newtow's laws. That's just = the correct math. >No problem where it's used, it's just ... clean ! Jef is right in what he's saying. And there are more accurate ways of = integrating when the force is continually changing. BUT if you are to = use either Euler's or Newton's method, I've found Euler's is better for = stiff springs or hard collisions, simply because the position is changed = more by the acceleration Newton's: pos +=3D v*t + a*t*t/2 Euler's: pos +=3D v*t + a*t*t The difference is that Newton's method models the spring as a constant = force over each time interval, Euler's models the spring as a single = impulse at each time step. Euler's is therefore better at handling = impulses (sudden changes in velocity) such as collisions. For more accurate integration methods there's the midpoint method: k1 =3D vel m1 =3D Acceleration(pos, vel) k2 =3D vel + m1*dt/2 m2 =3D Acceleration(pos + k1*dt/2, k2) pos +=3D k2*dt vel +=3D m2*dt and other's such as 4th order RungeKutta and implicit (which is = always stable). 
From: Jason Williams <Jason.Williams@bl...>  20030207 16:33:45

What he means, is you allocate an array of 4 billion integers. Then in = each integer, you calculate & store the log2 of the value. Then when you = need to know the log2 of the value fast, you look it up in the array. :) You can find the highest set bit in a braindead manner like this: // "Number" is the value you want to find the highestsetbit from unsigned int Number =3D ???; unsigned int i =3D 31; while (i > 0) { if (Number & (1<<i)) break; i; } // i is now the index of the highest set bit in "Number" // Assuming Number is an unsigned int of course // If it's a signed value, you need to discard the sign first and // add 1 to i at the end to allow for storage of the sign. If you simply need to know how many bytes it'll need to store it in, = it's probably faster and easier to do something even more braindead, = like: unsigned int NumBits; if (Number <=3D 0xff) NumBits =3D 8; if (Number <=3D 0xffff) NumBits =3D 16; if (Number <=3D 0xffffff) NumBits =3D 24; else NumBits =3D 32; And even better still, the ultra fast: const unsigned int i =3D 32; // ;) Jason > Original Message > From: Gareth Lewin [mailto:GLewin@...] > Sent: 07 February 2003 16:11 > To: gdalgorithmslist@... > Subject: RE: [Algorithms] Log2 using bitwise operators >=20 >=20 > Sorry ? Can you elborate ? >=20 > Original Message > From: Joakim Hagdahl [mailto:disc@...] > Sent: 07 February 2003 16:03 > To: gdalgorithmslist@... > Subject: Re: [Algorithms] Log2 using bitwise operators >=20 >=20 > precalc an array of bytes. >=20 >=20 >  > This SF.NET email is sponsored by: > SourceForge Enterprise Edition + IBM + LinuxWorld =3D Something 2 See! > http://www.vasoftware.com > _______________________________________________ > GDAlgorithmslist mailing list > GDAlgorithmslist@... > https://lists.sourceforge.net/lists/listinfo/gdalgorithmslist > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_id=3D6188 >=20 
From: Simon O'Connor <simon@cr...>  20030207 16:25:02

0000000000100011 == 6 bits <> ... sizeof( word ) * 8 == 16 bits "store" may have been the wrong word for Zafar to use. Simon O'Connor Creative Asylum Limited http://www.creativeasylum.com Original Message From: Michael Pohoreski [mailto:MPohoreski@...] Sent: 07 February 2003 15:50 To: gdalgorithmslist@... Subject: RE: [Algorithms] Log2 using bitwise operators eh? Why wouldn't sizeof() work ? i.e. sizeof( type ) / 8 ? Original Message From: Zafar Qamar [mailto:zafar.qamar@...] Sent: Friday, February 07, 2003 10:17 AM To: gdalgorithmslist@... Subject: [Algorithms] Log2 using bitwise operators Hi, Does anyone know if it's possible to calculate how many bits are required to store an integer, using simple operations (bitwise etc)? 
From: Gareth Lewin <GLewin@cl...>  20030207 16:11:31

Sorry ? Can you elborate ? Original Message From: Joakim Hagdahl [mailto:disc@...] Sent: 07 February 2003 16:03 To: gdalgorithmslist@... Subject: Re: [Algorithms] Log2 using bitwise operators precalc an array of bytes. 
From: Joakim Hagdahl <disc@ho...>  20030207 16:03:21

precalc an array of bytes.  Original Message =20 From: Zafar Qamar=20 To: gdalgorithmslist@...=20 Sent: Friday, February 07, 2003 4:16 PM Subject: [Algorithms] Log2 using bitwise operators Hi, Does anyone know if it's possible to calculate how many bits are = required to store an integer, using simple operations (bitwise etc)? Many thanks in advance, Zaf __________________________________________________________ This mail has been scanned for all known viruses by UUNET=20 delivered through the MessageLabs Virus Control Centre. 
From: Ville Miettinen <wili@ma...>  20030207 15:58:06

If this is in timecritical code and you are targeting a specific processor, you can use the processor's native "count leading zeroes" instruction (CLZ on ARM and many other processors and BSR on x86). cheers, wili  o Ville Miettinen, Lead Programmer o Hybrid Graphics, Ltd. o Email: wili@... o Web: http://www.hybrid.fi Original Message From: gdalgorithmslistadmin@... [mailto:gdalgorithmslistadmin@...]On Behalf Of Alex Clarke Sent: Friday, February 07, 2003 17:33 To: 'gdalgorithmslist@...' Subject: RE: [Algorithms] Log2 using bitwise operators Check out graphics gems 2 in the section called bit counting Original Message From: Zafar Qamar [mailto:zafar.qamar@...] Sent: 07 February 2003 15:17 To: gdalgorithmslist@... Subject: [Algorithms] Log2 using bitwise operators Hi, Does anyone know if it's possible to calculate how many bits are required to store an integer, using simple operations (bitwise etc)? Many thanks in advance, Zaf __________________________________________________________ This mail has been scanned for all known viruses by UUNET delivered through the MessageLabs Virus Control Centre. 
From: Gareth Lewin <GLewin@cl...>  20030207 15:55:27

He isn't asking how large a variable of type integer would take. He is asking how much memory a specific value takes. So say you have 38 pickupable objects in the game. How many bits would be needed to store the number picked up. Original Message From: Michael Pohoreski [mailto:MPohoreski@...] Sent: 07 February 2003 15:50 To: gdalgorithmslist@... Subject: RE: [Algorithms] Log2 using bitwise operators eh? Why wouldn't sizeof() work ? i.e. sizeof( type ) / 8 ? Original Message From: Zafar Qamar [ mailto:zafar.qamar@... <mailto:zafar.qamar@...> ] Sent: Friday, February 07, 2003 10:17 AM To: gdalgorithmslist@... Subject: [Algorithms] Log2 using bitwise operators Hi, Does anyone know if it's possible to calculate how many bits are required to store an integer, using simple operations (bitwise etc)? 
From: Michael Pohoreski <MPohoreski@cy...>  20030207 15:51:09

eh? Why wouldn't sizeof() work ? i.e. sizeof( type ) / 8 ? Original Message From: Zafar Qamar [mailto:zafar.qamar@...]=20 Sent: Friday, February 07, 2003 10:17 AM To: gdalgorithmslist@... Subject: [Algorithms] Log2 using bitwise operators Hi, Does anyone know if it's possible to calculate how many bits are required to store an integer, using simple operations (bitwise etc)? 
From: Jamie Fowlston <jamief@qu...>  20030207 15:46:10

http://aggregate.org/MAGIC/#Log2%20of%20an%20Integer jamie Original Message From: gdalgorithmslistadmin@... [mailto:gdalgorithmslistadmin@...]On Behalf Of Zafar Qamar Sent: 07 February 2003 15:17 To: gdalgorithmslist@... Subject: [Algorithms] Log2 using bitwise operators Hi, Does anyone know if it's possible to calculate how many bits are required to store an integer, using simple operations (bitwise etc)? Many thanks in advance, Zaf __________________________________________________________ This mail has been scanned for all known viruses by UUNET delivered through the MessageLabs Virus Control Centre. 
From: Gareth Lewin <GLewin@cl...>  20030207 15:31:26

http://www.flipcode.com/cgibin/msg.cgi?showThread=TipBitsCompileTime <http://www.flipcode.com/cgibin/msg.cgi?showThread=TipBitsCompileTime&foru m=totd&id=1> &forum=totd&id=1 That's at compile time, but the theory is the same :) Original Message From: Zafar Qamar [mailto:zafar.qamar@...] Sent: 07 February 2003 15:17 To: gdalgorithmslist@... Subject: [Algorithms] Log2 using bitwise operators Hi, Does anyone know if it's possible to calculate how many bits are required to store an integer, using simple operations (bitwise etc)? Many thanks in advance, Zaf __________________________________________________________ This mail has been scanned for all known viruses by UUNET delivered through the MessageLabs Virus Control Centre. 
From: Alex Clarke <alexc@ar...>  20030207 15:31:01

Check out graphics gems 2 in the section called bit counting Original Message From: Zafar Qamar [mailto:zafar.qamar@...] Sent: 07 February 2003 15:17 To: gdalgorithmslist@... Subject: [Algorithms] Log2 using bitwise operators Hi, Does anyone know if it's possible to calculate how many bits are required to store an integer, using simple operations (bitwise etc)? Many thanks in advance, Zaf __________________________________________________________ This mail has been scanned for all known viruses by UUNET delivered through the MessageLabs Virus Control Centre. 
From: Zafar Qamar <zafar.qamar@sw...>  20030207 15:19:40

Hi, Does anyone know if it's possible to calculate how many bits are required to store an integer, using simple operations (bitwise etc)? Many thanks in advance, Zaf __________________________________________________________ This mail has been scanned for all known viruses by UUNET delivered through the MessageLabs Virus Control Centre. 
From: Yordan Gyurchev <yordan@gy...>  20030207 09:35:36

> I wrote a memory manager about 3 weeks ago. The manager > is based on a set of fixed sized buckets for small allocations > and a singly linked list for large ones. Here's some tips for > pretty good performance: In fact I have something like that for small object allocations. As you know the perobject new and delete operators provide the size so you can speed things there because you know the size at both "allocate and free" times. If you reuse the memory and store there the "next" pointer the overhead is nothing per allocation and the speed is O(1). But Instead of the single linked list for the large ones I have the hash based allocator. Michael Pohoreski wrote: > You'll get far faster performance, and less overhead if you use > fixedsize memory pools. I acknowledge this and I'm using them but some cases just don't fit this approach and the a lot of memory is wasted... > Why are you using a generic allocatoranyways on consoles?! If "generic" is used as in "random size" here I use them because the allocated sizes are quite random and large sometimes and don't fit the fixed size scheme. For relatively small allocations I agree that fixed memory pools are unbeatable. In fact I'm using a hybrid ... Plus in the hash based scheme I was talking about (or any other) method I allocate the blocks at the end of the free bigger chunk so all allocations concentrated at the end of the memory area In this way I can easily allocate from the front more space for the fixed pools without fragmenting the memory. This also provides quick check if the block is from a fixed pool or not by simply checking where the address is... Yordan  Original Message  From: "Mark Wayland" <Mwayland@...> To: <gdalgorithmslist@...> Sent: Thursday, February 06, 2003 11:51 PM Subject: RE: [Algorithms] Memory Allocators Chris, I wrote a memory manager about 3 weeks ago. The manager is based on a set of fixed sized buckets for small allocations and a singly linked list for large ones. Here's some tips for pretty good performance: * If your pool allocations are in fixed sized increments, say 8 bytes, then you can quickly and easily find which pool an allocation should come from: nPoolIndex = nAllocSize >> 3; if (nPoolIndex > MAX_POOL_INDEX) AllocFromList(...) * When a pool is empty there are many heuristics you can use to fill it. A couple I've used are: * Simply filling from the list with a fixed number of allocs. So you simply alloc n * nAllocSize from the large list. * Take items from pools whose size is a multiple of the requested size. A simple example is filling the 8byte pool with a 16byte pool alloc split into 2 8byte allocs. There are lots of things you could do here. I would suggest adding a hint mechanism whereby the app can prealloc a set number of pool items. * The large list is stored as a basic structure like struct ListNode { ListNode* pNextNode; unsigned int nNodeSize; }; Obviously, pNextNode is used in implementing the linked list. The fun bit comes into play when allocating... when you find a node containing enough memory to allocate from, instead of splitting it into multiple nodes and relinking the list, simply decrement the size by the allocated amount and return a pointer to pListNode + nNodeSize  nAllocSize, effectively allocating from the end of the block. * In memory allocations, I store a pointer to the heap object that the allocation came from and the size of the allocation. This lets us use multiple heaps safely and the pointer to the heap effectively acts as the magic number ensuring allocs came from the same heap that they're being freed from. I'm no expert on memory management or anything like that, but I've used the above techniques to implement a working memory manager that is at least 10 times faster than what we had (in most cases faster than 10x), took 3 hours to write, 8 hours to debug a failure after more than 100000 allocations, supports multiple heaps, and is conceptually very simple in operation. It is also trivial to get allocation statistics from it... Let me know if you want more info, Cheers, Mark > Original Message > From: Chris Brodie [mailto:Chris.Brodie@...] > Sent: Wednesday, 5 February 2003 4:58 PM > To: 'gdalgorithmslist@...' > Subject: [Algorithms] Memory Allocators > > > Can anyone here recommend a small easy to understand memory > manager. I'm stuck writing a utility to allocate AGP ram and > would like a reference. > > How I'm doing(or am trying to) it is I allocate a block of > memory to the manager. The manager then is asked for memory. > It subdivides it's pool in POW2 increments until it's found > the smallest division thats larger than the requested size. > Marks the allocation as used and returns the pointer. The > pointer is stored as an ID ready for the > 'deallocation'(unmarking). I'm considering things like > keeping lists of the unused fragments in an ordered vector > for easier searching as well. > > Does anyone have any information on a implementation on how I > can get away with doing this? > > Many thanks, > > Chris > > > NOTICE > This email and any attachments are confidential and may > contain copyright material of Macquarie Bank or third > parties. If you are not the intended recipient of this email > you should not read, print, retransmit, store or act in > reliance on this email or any attachments, and should > destroy all copies of them. Macquarie Bank does not guarantee > the integrity of any emails or any attached files. The views > or opinions expressed are the author's own and may not > reflect the views or opinions of Macquarie Bank. > > > >  > This SF.NET email is sponsored by: > SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! > http://www.vasoftware.com > _______________________________________________ > GDAlgorithmslist mailing list > GDAlgorithmslist@... > https://lists.sourceforge.net/lists/listinfo/gdalgorithmslist > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_id=6188 >  This SF.NET email is sponsored by: SourceForge Enterprise Edition + IBM + LinuxWorld =omething 2 See! http://www.vasoftware.com _______________________________________________ GDAlgorithmslist mailing list GDAlgorithmslist@... https://lists.sourceforge.net/lists/listinfo/gdalgorithmslist Archives: http://sourceforge.net/mailarchive/forum.php?forum_ida88 
From: Justin HeyesJones <justin.heyesjones@ge...>  20030207 09:34:46

For spring systems you can use implicit integration to avoid the = problems that Euler does. See Game Gems I for an intro.  Original Message =20 From: Tom Lowe=20 To: gdalgorithmslist@...=20 Sent: Friday, February 07, 2003 12:23 AM Subject: Re: [Algorithms] Euler's integration >Tom, >I don't get the point and what you meant by telling Euler's = integration gives more responsive position >change. >If you retake the context which is to have a set of forces applied to = a body in a time's interval, the kinetic >of >this body is just perfectly defined by the Newtow's laws. That's just = the correct math. >No problem where it's used, it's just ... clean ! Jef is right in what he's saying. And there are more accurate ways of = integrating when the force is continually changing. BUT if you are to = use either Euler's or Newton's method, I've found Euler's is better for = stiff springs or hard collisions, simply because the position is changed = more by the acceleration Newton's: pos +=3D v*t + a*t*t/2 Euler's: pos +=3D v*t + a*t*t The difference is that Newton's method models the spring as a constant = force over each time interval, Euler's models the spring as a single = impulse at each time step. Euler's is therefore better at handling = impulses (sudden changes in velocity) such as collisions. For more accurate integration methods there's the midpoint method: k1 =3D vel m1 =3D Acceleration(pos, vel) k2 =3D vel + m1*dt/2 m2 =3D Acceleration(pos + k1*dt/2, k2) pos +=3D k2*dt vel +=3D m2*dt and other's such as 4th order RungeKutta and implicit (which is = always stable). 
From: <nikopol0@al...>  20030207 01:09:50

I think the real issue with stiff problems (such as spring simulations) is not really the order of the integrator, but rather the way the integrator can *adaptively* change the time step (this suppose a method to have an approximation of the error). And the point is that runge kutta methods (embeded ones) have a natural way for doing this. But I think all this stuff is pretty well explain in the NR : http://www.library.cornell.edu/nr/bookcpdf/c162.pdf It worth the trial, it can speed up with an order of magnitude classical integration schemes. Gabriel  Original Message  From: Tom Lowe To: gdalgorithmslist@... Sent: Friday, February 07, 2003 1:23 AM Subject: Re: [Algorithms] Euler's integration >Tom, >I don't get the point and what you meant by telling Euler's integration gives more responsive position >change. >If you retake the context which is to have a set of forces applied to a body in a time's interval, the kinetic >of >this body is just perfectly defined by the Newtow's laws. That's just the correct math. >No problem where it's used, it's just ... clean ! Jef is right in what he's saying. And there are more accurate ways of integrating when the force is continually changing. BUT if you are to use either Euler's or Newton's method, I've found Euler's is better for stiff springs or hard collisions, simply because the position is changed more by the acceleration Newton's: pos += v*t + a*t*t/2 Euler's: pos += v*t + a*t*t The difference is that Newton's method models the spring as a constant force over each time interval, Euler's models the spring as a single impulse at each time step. Euler's is therefore better at handling impulses (sudden changes in velocity) such as collisions. For more accurate integration methods there's the midpoint method: k1 = vel m1 = Acceleration(pos, vel) k2 = vel + m1*dt/2 m2 = Acceleration(pos + k1*dt/2, k2) pos += k2*dt vel += m2*dt and other's such as 4th order RungeKutta and implicit (which is always stable). 
From: Tom Lowe <tomlowe@kr...>  20030207 00:23:22

>Tom, >I don't get the point and what you meant by telling Euler's integration = gives more responsive position >change. >If you retake the context which is to have a set of forces applied to a = body in a time's interval, the kinetic >of >this body is just perfectly defined by the Newtow's laws. That's just = the correct math. >No problem where it's used, it's just ... clean ! Jef is right in what he's saying. And there are more accurate ways of = integrating when the force is continually changing. BUT if you are to = use either Euler's or Newton's method, I've found Euler's is better for = stiff springs or hard collisions, simply because the position is changed = more by the acceleration Newton's: pos +=3D v*t + a*t*t/2 Euler's: pos +=3D v*t + a*t*t The difference is that Newton's method models the spring as a constant = force over each time interval, Euler's models the spring as a single = impulse at each time step. Euler's is therefore better at handling = impulses (sudden changes in velocity) such as collisions. For more accurate integration methods there's the midpoint method: k1 =3D vel m1 =3D Acceleration(pos, vel) k2 =3D vel + m1*dt/2 m2 =3D Acceleration(pos + k1*dt/2, k2) pos +=3D k2*dt vel +=3D m2*dt and other's such as 4th order RungeKutta and implicit (which is always = stable). 