Home  |   Login  |   Logout  |   Access Information  |   Alerts  |   Purchase History  |   Cart  |   Sitemap  |   Help   
 
Login
BROWSE SEARCH IEEE XPLORE GUIDE SUPPORT
Article Information

Compile time recursive objects in C++
Jarvi, J.
Technology of Object-Oriented Languages, 1998. TOOLS 27. Proceedings
Volume , Issue , 22-25 Sep 1998 Page(s):66 - 77
Digital Object Identifier   10.1109/TOOLS.1998.713588
Summary:The article explores the possibilities of generic programming offered by the template features of C++. We define compile time recursive objects as instances of class templates which contain other instances of the same template as member variables. With such templates we can define containers that contain objects of arbitrary types, but where the type of each element is known at compile time. The structure of the container is therefore fixed. The technique mimics the polymorphism achieved with dynamic binding and inheritance using static binding and template specialisation. It is obviously less flexible but offers considerable performance gains at runtime. We give the template definitions for compile time recursive lists and explain how to perform operations on these lists. As an example application, we use compile time lists in the definition of templates for special sparse vectors and matrices. In these vectors and matrices, the sparseness pattern can be arbitrary but must be known at compile time. The tracking of zero and nonzero elements is performed at compile time. This allows the programmer to use abstract vector and matrix expressions and still reach performance equal to hand coded operations. This is possible since the compiler can locate the elementary expressions between zero entries and discard them entirely from the resulting code

» View citation and abstract

IEEE Members

Log in by entering your IEEE Web Account Username and Password.

IEEE Communications Society members: If you subscribe to the IEEE Electronic Periodicals Package or IEEE Electronic Periodicals Package Plus, you must access your subscription at www.comsoc.org.

Users at Subscribing Institutions

Check with your librarian, information professional, or system manager to determine if you need to log in. Please complete the online Technical Support Form if you need assistance.

Already Purchased This Article?

Select the Purchase History link to access the document. You will have 5 Days after purchase to access the Full Text PDF. Please complete the online Technical Support Form if you need assistance.

Guests

• Search and access Abstract records free of charge
Register for table of contents alerts
• Purchase Full Text PDF documents

» Learn more about subscription options or how to become an IEEE Member.

You are not logged in.
LOGIN
Username
Password
GO
» Forgot your password?
Please remember to log out when you have finished your session.
You must log in to access:
• Advanced or Author Search
• CrossRef Search
• AbstractPlus Records
• Full Text PDF
• Full Text HTML
Access this document
» Buy this document now
» Learn more about
» Learn more about
   purchasing articles
   and standards
Learn more about IEEE Subscriptions
Indexed by IEE Inspec
© Copyright 2009 IEEE – All Rights Reserved