On Sun, 23 Apr 2006, Daniel Reed wrote:
On Sun, 23 Apr 2006, Bob Friesenhahn wrote:
Agreed. The other issue is that with an abstracted interface, performance
can really suck.
Abstraction needn't necessarily have any impact on performance at all. You
may be able to get by with something as simple as using a forwarded-only
struct pointer in your API that is simply typedefined to be some
build-environment-dependent type internally.
[ stuff removed ]
typedef struct nscreen_window_t {
uint32_t framebuffer[1024][768];
int x, y;
} nscreen_window_t;
Your example seems to assume that the client app will not be
manipulating 'framebuffer directly'. If it does (for performance
reasons), then it needs to know that framebuffer is an array of
uint32_t with a particular size.
This was a great example since it represents the main bit of configury
in my library that needs to be remembered at install time. The type
representing 'framebuffer' can be one of three possible sizes and the
application is free to update it.
Bob
======================================
Bob Friesenhahn
bfriesen@xxxxxxxxxxxxxxxxxxx, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer, http://www.GraphicsMagick.org/
_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
http://lists.gnu.org/mailman/listinfo/autoconf