本文整理匯總了C++中AF_THROW函數的典型用法代碼示例。如果您正苦於以下問題:C++ AF_THROW函數的具體用法?C++ AF_THROW怎麽用?C++ AF_THROW使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了AF_THROW函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。
示例1: AF_THROW
// Helper functions
dim4 array::dims() const
{
dim_type d0, d1, d2, d3;
AF_THROW(af_get_dims(&d0, &d1, &d2, &d3, arr));
return dim4(d0, d1, d2, d3);
}
示例2: upper
array upper(const array &in, bool is_unit_diag)
{
af_array res;
AF_THROW(af_upper(&res, in.get(), is_unit_diag));
return array(res);
}
示例3: AF_THROW
void Window::hist(const array& X, const double minval, const double maxval,
const char* const title) {
af_cell temp{_r, _c, title, AF_COLORMAP_DEFAULT};
AF_THROW(af_draw_hist(get(), X.get(), minval, maxval, &temp));
}
示例4: tile
array tile(const array& in, const af::dim4 &dims)
{
af_array out = 0;
AF_THROW(af_tile(&out, in.get(), dims[0], dims[1], dims[2], dims[3]));
return array(out);
}
示例5: shift
array shift(const array& in, const int x, const int y, const int z, const int w)
{
af_array out = 0;
AF_THROW(af_shift(&out, in.get(), x, y, z, w));
return array(out);
}
示例6: identity
array identity(const dim4 &dims, const af::dtype type)
{
af_array res;
AF_THROW(af_identity(&res, dims.ndims(), dims.get(), type));
return array(res);
}
示例7: flat
array flat(const array& in)
{
af_array out = 0;
AF_THROW(af_flat(&out, in.get()));
return array(out);
}
示例8: arr
array::array(const array& in) : arr(0), isRef(false)
{
AF_THROW(af_weak_copy(&arr, in.get()));
}
示例9: range
array range(const dim4 &dims, const int seq_dim, const af::dtype ty)
{
af_array out;
AF_THROW(af_range(&out, dims.ndims(), dims.get(), seq_dim, ty));
return array(out);
}
示例10: approx1
array approx1(const array& yi, const array &xo, const interpType method, const float offGrid)
{
af_array yo = 0;
AF_THROW(af_approx1(&yo, yi.get(), xo.get(), method, offGrid));
return array(yo);
}
示例11: iota
array iota(const dim4 &dims, const dim4 &tile_dims, const af::dtype ty)
{
af_array out;
AF_THROW(af_iota(&out, dims.ndims(), dims.get(), tile_dims.ndims(), tile_dims.get(), ty));
return array(out);
}
示例12: median
AFAPI array median(const array& in, const dim_t dim)
{
af_array temp = 0;
AF_THROW(af_median(&temp, in.get(), getFNSD(dim, in.dims())));
return array(temp);
}
示例13: moddims
array moddims(const array& in, const unsigned ndims, const dim_t * const dims)
{
af_array out = 0;
AF_THROW(af_moddims(&out, in.get(), ndims, dims));
return array(out);
}
示例14: transform
array transform(const array& in, const array& transform, const dim_type odim0, const dim_type odim1, const bool inverse)
{
af_array out = 0;
AF_THROW(af_transform(&out, in.get(), transform.get(), odim0, odim1, inverse));
return array(out);
}
示例15: join
array join(const int dim, const array& first, const array& second)
{
af_array out = 0;
AF_THROW(af_join(&out, dim, first.get(), second.get()));
return array(out);
}