Equalizer  1.4.1
gpuInfo.h
00001 
00002 /* Copyright (c) 2011, Stefan Eilemann <eile@eyescale.ch> 
00003  *
00004  * This library is free software; you can redistribute it and/or modify it under
00005  * the terms of the GNU Lesser General Public License version 2.1 as published
00006  * by the Free Software Foundation.
00007  *  
00008  * This library is distributed in the hope that it will be useful, but WITHOUT
00009  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
00010  * FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more
00011  * details.
00012  * 
00013  * You should have received a copy of the GNU Lesser General Public License
00014  * along with this library; if not, write to the Free Software Foundation, Inc.,
00015  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
00016  */
00017 
00018 #ifndef EQFABRIC_GPUINFO_H
00019 #define EQFABRIC_GPUINFO_H
00020 
00021 #include <eq/fabric/types.h>
00022 #include <iostream>
00023 
00024 namespace eq
00025 {
00026 namespace fabric
00027 {
00029     struct GPUInfo
00030     {
00032         GPUInfo() : port( LB_UNDEFINED_UINT32 ), device( LB_UNDEFINED_UINT32 )
00033             {}
00034 
00036         bool operator == ( const GPUInfo& rhs ) const 
00037             { return port==rhs.port && device==rhs.device && pvp==rhs.pvp; }
00038 
00040         bool operator != ( const GPUInfo& rhs ) const 
00041             { return port!=rhs.port || device!=rhs.device || pvp!=rhs.pvp; }
00042 
00044         uint32_t port;
00045 
00047         uint32_t device;
00048 
00050         PixelViewport pvp;
00051 
00052         std::string hostname; 
00053     };
00054 
00055     inline std::ostream& operator << ( std::ostream& os, const GPUInfo& info )
00056     {
00057         if( !info.hostname.empty( ))
00058             os << "hostname " << info.hostname << std::endl;
00059         if( info.port != LB_UNDEFINED_UINT32 )
00060             os << "port     " << info.port << std::endl;
00061         if( info.device != LB_UNDEFINED_UINT32 )
00062             os << "device   " << info.device << std::endl;
00063         if( info.pvp.isValid( ))
00064             os << "viewport " << info.pvp << std::endl;
00065         return os;
00066     }
00067 
00068 }
00069 }
00070 #endif // EQFABRIC_GPUINFO_H
00071 
Generated on Mon Nov 26 2012 14:41:49 for Equalizer 1.4.1 by  doxygen 1.7.6.1