本文整理汇总了C++中aol::Vector::getData方法的典型用法代码示例。如果您正苦于以下问题:C++ Vector::getData方法的具体用法?C++ Vector::getData怎么用?C++ Vector::getData使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类aol::Vector
的用法示例。
在下文中一共展示了Vector::getData方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Exception
_DataType aol::Vector<_DataType>::operator* ( const aol::Vector<_DataType> &c ) const {
if ( c.size() != _size ) {
throw aol::Exception ( "Vector::operator*: Vectorlengths not equal...", __FILE__, __LINE__ );
} else {
return ScalarProduct<DataType> ( this->_pData, c.getData(), _size );
}
return 0;
}
示例2: multCarefullyAtBoundary
void qc::FastUniformGridMatrix<_DataType, qc::QC_2D, BaseClass>::applyAdd ( const aol::Vector<_DataType> &Arg, aol::Vector<_DataType> &Dest ) const {
#ifdef _OPENMP
#pragma omp parallel for
#endif
for ( int i = 0; i <= _w + 1; ++i ) {
multCarefullyAtBoundary ( i, Arg, Dest );
}
#if 1
const DataType * ArgPtr = Arg.getData();
DataType * DestPtr = Dest.getData();
#ifdef _OPENMP
#pragma omp parallel for
#endif
for ( int i = _w + 2; i < _size - _w - 2; ++i ) {
for ( int k = 0; k < 3; ++k ) {
int globos = _w * ( k - 1 ) - 1;
int g = globos + i;
for ( int j = 0; j < 3; ++j ) {
DestPtr[i] += ArgPtr[g++] * _rows[k][i][j];
}
}
}
#endif
#if 0
const int seg_len = 10;
for ( int seg = _w + 2; seg < _size - _w - 2; seg += seg_len ) {
const int seg_end = aol::Min ( seg + seg_len, _size - _w - 2 );
for ( int k = 0; k < 3; ++k ) {
int globos = _w * ( k - 1 ) - 1;
for ( int i = seg; i < seg_end; ++i ) {
// cerr << "inner row = " << i << endl;
int g = globos + i;
for ( int j = 0; j < 3; ++j ) {
Dest[i] += Arg[g++] * _rows[k][i][j];
}
}
}
}
#endif
#ifdef _OPENMP
#pragma omp parallel for
#endif
for ( int i = aol::Max ( _w + 2, _size - _w - 2 ); i < _size; ++i ) {
multCarefullyAtBoundary ( i, Arg, Dest );
}
}