Skip to Content
GPGPU Programming for Games and Science
book

GPGPU Programming for Games and Science

by David H. Eberly
August 2014
Intermediate to advanced
469 pages
16h 30m
English
A K Peters/CRC Press
Content preview from GPGPU Programming for Games and Science
Linear and Affine Algebra 277
Finally, the class implements the standard six comparison operators to
support sorted container classes; see Listing 6.19.
template <int NumRows , int NumCols , typename Real>
class Matrix
{
public :
// comparisons for sorted containers and geometric ordering
bool operator== ( M a t r i x const&mat) const ;
bool operator!= ( M atrix const&mat) const ;
bool operator< (Matrix const&mat) const ;
bool operator<=(Matrix const&mat) const ;
bool operator> (Matrix const&mat) const ;
bool operator>=(Matrix const&mat) const ;
} ;
LISTING 6.19: Comparison operators for the matrix class.
A large number of functions are defined outside the class, a practice sug-
gested in [55, Rule 44]. Included are unary operators so that you can write
expressions ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Graphics Gems V (IBM Version)

Graphics Gems V (IBM Version)

Alan W. Paeth
GPU Pro 6

GPU Pro 6

Wolfgang Engel

Publisher Resources

ISBN: 9781466595354