本文整理汇总了C++中A0::data方法的典型用法代码示例。如果您正苦于以下问题:C++ A0::data方法的具体用法?C++ A0::data怎么用?C++ A0::data使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类A0
的用法示例。
在下文中一共展示了A0::data方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: numel
BOOST_FORCEINLINE void
combine_eigens(const T& wr, const T& wi, A0& w)
{
typedef typename A0::value_type type_t;
int n = numel(wr);
w.resize(of_size(n, 1));
nt2::container::table<type_t, nt2::shared_> sw(of_size(n, 1), share(w.data(), w.data()+n));
sw = tocomplex(wr, wi);
}
示例2: operator
BOOST_FORCEINLINE result_type operator()(A0& a0, A1 a1, nt2::symmetric_ const&) const
{
result_type norm;
char uplo = 'L';
nt2_la_int n = nt2::width(a0);
nt2_la_int ld = n;
if(a1 =='I'|| a1 =='1'|| a1 =='O')
{
nt2::memory::container<tag::table_, result_type, nt2::_2D> work(nt2::of_size(n,1));
norm = NT2_F77NAME(zlansy)( &a1, &uplo, &n, a0.data(), &ld, work.data());
}
else
{
norm = NT2_F77NAME(zlansy)( &a1, &uplo, &n, a0.data(), &ld, 0);
}
return norm;
}
示例3: height
BOOST_FORCEINLINE void
combine_vects(const T1& rv, const T2& wi, A0& v)
{
typedef typename A0::value_type type_t;
int n = height(rv);
v.resize(of_size(n, n));
nt2::container::table<type_t, nt2::shared_> sv(of_size(n, n), share(v.data(), v.data()+numel(v)));
for(int j=1; j <= n; ++j)
{
if(wi(j))
{
sv(nt2::_, j ) = tocomplex(rv(nt2::_, j), rv(nt2::_, j+1));
sv(nt2::_, j+1) = conj(sv(nt2::_, j));
++j;
}
else
sv(nt2::_, j) = rv(nt2::_, j);
}
}
示例4: operator
BOOST_FORCEINLINE result_type operator()(A0& a0, A1& a1) const
{
result_type that;
nt2_la_int m = nt2::height(a0);
nt2_la_int n = nt2::width(a0);
nt2_la_int ld = a0.leading_size();
a1.resize( nt2::of_size(std::min(n, m), 1) );
magma_cgetrf(m, n, (cuFloatComplex*)a0.data(), ld, a1.data(), &that);
return that;
}
示例5: operator
BOOST_FORCEINLINE result_type operator()(A0& a0, A1& a1) const
{
result_type that;
nt2_la_int n = nt2::width(a0);
nt2_la_int ld = a0.leading_size();
nt2_la_int ldb = a1.leading_size();
nt2_la_int nhrs = nt2::width(a1);
char uplo = 'L';
NT2_F77NAME(zposv) ( &uplo, &n, &nhrs, a0.data(), &ld, a1.data(), &ldb
, &that
);
return that;
}
示例6: operator
BOOST_FORCEINLINE result_type operator()(A0& a0, A1& a1, A2& a2) const
{
result_type that;
nt2_la_int n = std::min(nt2::height(a0),nt2::width(a0));
nt2_la_int lda = n;
nt2_la_int nhrs = nt2::width(a2);
nt2_la_int ldb = a2.leading_size();
a1.resize(nt2::of_size(n,1));
magma_zgesv(n,nhrs,(cuDoubleComplex*)a0.data(),lda,a1.data()
,(cuDoubleComplex*)a2.data(),ldb,&that);
return that;
}
示例7: operator
BOOST_FORCEINLINE result_type operator()(A0 const& a0, A1 const& a1) const
{
result_type rcond;
nt2_la_int n = nt2::height(a0);
nt2_la_int ld = n;
nt2_la_int info;
char uplo = 'L';
nt2::memory::container<tag::table_, v_t, nt2::_2D> work(nt2::of_size(2*n,1));
nt2::memory::container<tag::table_, result_type, nt2::_2D> rwork(nt2::of_size(n,1));
NT2_F77NAME(zpocon) ( &uplo, &n, a0.data(), &ld, &a1, &rcond
, work.data(), rwork.data(), &info
);
return rcond;
}