Commit aaa6e33b authored by Fab's avatar Fab
Browse files

add operator=() because its implicit declaration is deprecated with g++-9

parent 11e3cede
......@@ -91,26 +91,46 @@ gkg::CudaProperties::CudaProperties( int32_t /* device */ )
gkg::CudaProperties::CudaProperties( const gkg::CudaProperties& other )
: _name( other._name ),
_globalMemory( other._globalMemory ),
_multiprocessors( other._multiprocessors ),
_coresPerMP( other._coresPerMP ),
_cores( other._cores ),
_clockRate( other._clockRate ),
_warpSize( other._warpSize ),
_maxThreadsPerBlock( other._maxThreadsPerBlock )
{
copy( other );
}
gkg::CudaProperties& gkg::CudaProperties::operator = (
const gkg::CudaProperties& other )
{
copy( other );
return *this;
}
void gkg::CudaProperties::copy( const gkg::CudaProperties& other )
{
try
{
_name = other._name;
_globalMemory = other._globalMemory;
_multiprocessors = other._multiprocessors;
_coresPerMP = other._coresPerMP;
_cores = other._cores;
_clockRate = other._clockRate;
_warpSize = other._warpSize;
_maxThreadsPerBlock = other._maxThreadsPerBlock;
std::memcpy( _maxBlockDim, other._maxBlockDim, 3 * sizeof( int32_t ) );
std::memcpy( _maxGridDim, other._maxGridDim, 3 * sizeof( int32_t ) );
}
GKG_CATCH( "gkg::CudaProperties::CudaProperties( "
GKG_CATCH( "void gkg::CudaProperties::copy( "
"const gkg::CudaProperties& other )" );
}
......
......@@ -18,6 +18,10 @@ struct CudaProperties
CudaProperties( int32_t device = 0 );
CudaProperties( const CudaProperties& other );
CudaProperties& operator = ( const CudaProperties& other );
void copy( const CudaProperties& other );
std::string _name;
size_t _globalMemory;
int32_t _multiprocessors;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment