Пример #1
0
    void complexVector::axpy(const Real alpha, const complexVector& x)
    {
      assert( x.length() == length() );

      int N=2*length();
      BLASRPFX(axpy,BLASINT(N),BLASREAL(alpha),BLASPREAL(x.data()),BLASINT(mnlIntOne),BLASPREAL(v_data),BLASINT(mnlIntOne));
    }
Пример #2
0
cudaError_t GridGpu::retrieveData(complexVector &gData)
{
    gData.resize(m_gridSize * m_gridSize);
    cudaMemcpy(gData.data(), m_d_gData, gData.size() * sizeof(complexGpu), cudaMemcpyDeviceToHost);
    return cudaGetLastError();
}
Пример #3
0
cudaError_t GridGpu::transferData(complexVector &trajData)
{
    cudaMemcpy(m_d_trajData, trajData.data(), trajData.size() * sizeof(complexGpu), cudaMemcpyHostToDevice);
    return cudaGetLastError();
}
Пример #4
0
    void complexVector::operator -=(const complexVector& v2)
    {
      assert( v2.length()==length() ); 

      BLASCPFX(axpy,BLASINT(m_N),BLASCOMPLEX(mnlComplexMinusOne),BLASPCOMPLEX(v2.data()),BLASINT(mnlIntOne),BLASPCOMPLEX(v_data),BLASINT(mnlIntOne));
    } 
Пример #5
0
 void complexVector::gemv(const complexVector& x, const complexMatrix& A, const char trans, const std::complex<Real> alpha, const std::complex<Real> beta)
 {
   BLASCPFX(gemv,BLASCHAR(trans),BLASINT(A.rows()),BLASINT(A.cols()),BLASCOMPLEX(alpha),BLASPCOMPLEX(A.data()[0]),BLASINT(A.rows()),BLASPCOMPLEX(x.data()),BLASINT(mnlIntOne),BLASCOMPLEX(beta),BLASPCOMPLEX(data()),BLASINT(mnlIntOne));
 }
Пример #6
0
 void complexVector::gemv(const complexVector& x, const Matrix& A, const char trans, const Real alpha, const Real beta)
 {
   BLASRPFX(gemv,BLASCHAR(trans),BLASINT(A.rows()),BLASINT(A.cols()),BLASREAL(alpha),BLASPREAL(A.data()[0]),BLASINT(A.rows()),BLASPREAL(x.data()),BLASINT(mnlIntTwo),BLASREAL(beta),BLASPREAL(data()),BLASINT(mnlIntTwo));
   BLASRPFX(gemv,BLASCHAR(trans),BLASINT(A.rows()),BLASINT(A.cols()),BLASREAL(alpha),BLASPREAL(A.data()[0]),BLASINT(A.rows()),BLASPREAL(x.data())+1,BLASINT(mnlIntTwo),BLASREAL(beta),BLASPREAL(data())+1,BLASINT(mnlIntTwo));
 }
Пример #7
0
    void complexVector::axpy(const std::complex<Real> alpha, const complexVector& x)
    {
      assert( x.length() == length() );

      BLASCPFX(axpy,BLASINT(m_N),BLASCOMPLEX(alpha),BLASPCOMPLEX(x.data()),BLASINT(mnlIntOne),BLASPCOMPLEX(v_data),BLASINT(mnlIntOne));
    }
Пример #8
0
 complexVector::complexVector(const string& n_name, const complexVector& vector) :
   basicVector< std::complex<Real> >(n_name,vector.length(),false,const_cast<std::complex<Real>*>(vector.data()))
 {
 }