• Pages

  • Tags

  • Recent Posts

  • Recent Comments

  • Archives

  • Fri 6 Jul 2007

    EA STL

    Published at 9:28   Category C++, Game development  

    Electronic Arts has been writing their own set of C++ STL because the standard STL doesn’t fit gamedev constraints :

    Gaming platforms and game designs place requirements on game software which differ from requirements of other platforms. Most significantly, game software requires large amounts of memory but has a limited amount to work with. Gaming software is also faced with other limitations such as weaker processor caches, weaker CPUs, and non-default memory alignment requirements. A result of this is that game software needs to be careful with its use of memory and the CPU. The C++ standard library’s containers, iterators, and algorithms are potentially useful for a variety of game programming needs. However, weaknesses and omissions of the standard library prevent it from being ideal for high performance game software. Foremost among these weaknesses is the allocator model. An extended and partially redesigned replacement (EASTL) for the C++ standard library was implemented at Electronic Arts in order to resolve these weaknesses in a portable and consistent way. This paper describes game software development issues, perceived weaknesses of the current C++ standard, and the design of EASTL as a partial solution for these weaknesses.

    Tags: , , ,


    Related posts

    Fri 13 Apr 2007

    GCC - No newline at end of file

    Published at 15:09   Category C++  

    Just a small post to understand why GCC complains that there is “No newline at end of file” :

    > What is the rationale for this warning ? What can break or is it a
    > standards thing ?
    
    Imagine foo.h:
    
    blah blah blah
    
    Now bar.c:
    
    #include “foo.h”
    #include “grill.h”
    
    Now imagine a preprocessor that isn’t smart enough to put
    the newline in for you…
    
    blah blah blah#include “grill.h”
    
    It may not include grill.h.

    That’s obvious but I never thought about it =)

    Tags:


    Related posts

    Wed 2 Nov 2005

    KCacheGrind

    Published at 10:33   Category C++  

    This is the homepage of the profiling tool Callgrind (previously called Calltree) and the profile data visualization KCachegrind.

    Profiling is important, do it!

    Tags:


    Related posts

    Tue 18 Oct 2005

    Linking with .a

    Published at 18:13   Category C++  

    So, another lesson learned from Sam…
    Linking with .so and .a isn’t the same (appart from the static/dynamic part).
    The order of the .a inclusion is important :

    g++ -o bla bla.cpp x.a y.a z.a 

    g++ will look at bla.cpp, look what symbols it needs and remember them. When loading x.a, it will only keep the symbols it has tagged before hands.
    So if y.a needs an element in x.a which isn’t needed by bla.cpp, you won’t have it !!
    So you should include y.a before x.a. If there are cyclic dependencies, it doesn’t matter if you include the same object twice.
    Next headache please!!

    Tags:


    Related posts

    Mon 10 Oct 2005

    How to Unmangle Names from the Linker

    Published at 17:13   Category C++  

    Clark Dorman wrote:

    "Comming with g+ +, there`s a tool called "c++filt". Give it a mangled name and it will demangle it for you." 

    Example :

    $> c++filt _ZN14daeSTLDatabaseC1Ev
    daeSTLDatabase::daeSTLDatabase()

    Tags:


    Related posts

    Thu 10 Feb 2005

    Template Meta Programming

    Published at 18:20   Category C++  

    http://osl.iu.edu/~tveldhui/papers/Template-Metaprograms/meta-art.html

    The introduction of templates to C+ + added a facility whereby the compiler can act as an interpreter. This makes it possible to write programs in a subset of C+ + which are interpreted at compile time. Language features such as for loops and if statements can be replaced by template specialization and recursion. The first examples of these techniques were written by Erwin Unruh and circulated among members of the ANSI/ISO C++ standardization committee 1. These programs didn’t have to be executed — they generated their output at compile time as warning messages. For example, one program generated warning messages containing prime numbers when compiled.

    Here’s a simple example which generates factorials at compile time:

    template<int N> class Factorial { public:    enum { value = N * Factorial<N-1>::value }; };

    Tags:


    Related posts

    Mon 31 Jan 2005

    An introduction to C++ Traits

    Published at 13:39   Category C++  

    An introduction to C++ Traits, By Thaddaeus Frogley

     "Think of a trait as a small object whose main purpose is to carry information used by
       another object or algorithm to determine “policy” or “implementation details”.
       - Bjarne Stroustrup

    Tags:


    Related posts

    Thu 30 Dec 2004

    What will invalidate your iterators ?

    Published at 20:23   Category C++  

    Things you need to know when you add/delete/swap elements from STL containers.. Read below for more.

    Read more…

    Tags:


    Related posts

    Tue 2 Nov 2004

    Pointer Aliasing

    Published at 17:34   Category C++  

    Pointer aliasing can have a severe impact on program performance. Understanding its implications is critical to writing high-performance code. [This document] provides a brief introduction to the problem, and suggests several approaches to solving it through source-code restructuring, compiler options, and C or C++ language extensions.

    see also [this page] and [this pdf].

    Tags:


    Related posts

    Tue 2 Nov 2004

    Deriving the C++ Stream Buffer

    Published at 10:21   Category C++  

    Here

    Tags:


    Related posts

    Next Page >>>
  • Recent Posts

  • Recent Comments

  • Archives