本文整理汇总了C++中A0::raw方法的典型用法代码示例。如果您正苦于以下问题:C++ A0::raw方法的具体用法?C++ A0::raw怎么用?C++ A0::raw使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类A0
的用法示例。
在下文中一共展示了A0::raw方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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.raw(), w.raw()+n));
sw = tocomplex(wr, wi);
}
示例2: call
static type call(A0& a0, I const& indices)
{
Idx idx = nt2::function_index(indices, a0.extent(), meta::as_<typename A0::indexes_type>());
std::size_t b = nt2::run(idx, 0u, meta::as_<std::size_t>());
std::size_t e = nt2::run(idx, nt2::numel(idx.extent())-1u, meta::as_<std::size_t>())+1u;
typename A0::value_type* p = const_cast<typename A0::value_type*>(a0.raw());
return type(expr::make(container_ref(boost::make_shared<container>(idx.extent(), nt2::share(p+b, p+e)))));
}
示例3: 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.raw(), &ld, work.raw());
}
else
{
norm = NT2_F77NAME(zlansy)( &a1, &uplo, &n, a0.raw(), &ld, 0);
}
return norm;
}
示例4: operator
BOOST_FORCEINLINE result_type operator()(A0& a0, A1 const& a1) const
{
result_type that;
nt2_la_int n = nt2::width(a0);
nt2_la_int lda = a0.leading_size();
NT2_F77NAME(zpotrf) (&a1,&n,a0.raw(),&lda,&that);
return that;
}
示例5: operator
BOOST_FORCEINLINE result_type operator()(A0& a0, A1 const a1) const
{
result_type that;
nt2_la_int n = nt2::width(a0);
nt2_la_int lda = a0.leading_size();
magma_zpotrf(a1,n,(cuDoubleComplex*)a0.raw(),lda,&that);
return that;
}
示例6: 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.raw(), v.raw()+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);
}
}
示例7: operator
BOOST_FORCEINLINE result_type operator()( A0& a, A1& scale
, A2& ilo, A3& ihi, C0 job) const
{
result_type info;
nt2_la_int n = nt2::width(a);
BOOST_ASSERT_MSG(n == nt2_la_int(nt2::height(a)), "input must be square");
nt2_la_int lda = nt2::max(a.leading_size(), One<size_t>());
NT2_F77NAME(cgebal) (&job, &n
, a.raw(), &lda
, &ilo, &ihi
, scale.raw(), &info);
return info;
}
示例8: 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.raw(),lda,a1.raw()
,(cuDoubleComplex*)a2.raw(),ldb,&that);
return that;
}
示例9: operator
BOOST_FORCEINLINE result_type operator()(A0 const& a0, A1 const&a1, A2 const& a2) 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_F77NAME(zsycon) ( &uplo, &n, a0.raw(), &ld, a1.raw(), &a2, &rcond
, work.raw(), &info
);
return rcond;
}