本文整理汇总了C++中array::get方法的典型用法代码示例。如果您正苦于以下问题:C++ array::get方法的具体用法?C++ array::get怎么用?C++ array::get使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类array
的用法示例。
在下文中一共展示了array::get方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: join
array join(const int dim, const array& first, const array& second, const array &third, const array &fourth)
{
af_array out = 0;
af_array inputs[4] = {first.get(), second.get(), third.get(), fourth.get()};
AF_THROW(af_join_many(&out, dim, 4, inputs));
return array(out);
}
示例2: vectorField
void Window::vectorField(const array& xPoints, const array& yPoints,
const array& xDirs, const array& yDirs,
const char* const title) {
af_cell temp{_r, _c, title, AF_COLORMAP_DEFAULT};
AF_THROW(af_draw_vector_field_2d(get(), xPoints.get(), yPoints.get(),
xDirs.get(), yDirs.get(), &temp));
}
示例3: array
array approx2(const array& zi, const array &xo, const array &yo,
const interpType method, const float offGrid)
{
af_array zo = 0;
AF_THROW(af_approx2(&zo, zi.get(), xo.get(), yo.get(), method, offGrid));
return array(zo);
}
示例4: transform
array transform(const array& in, const array& transform, const dim_t odim0,
const dim_t odim1, const interpType method,
const bool inverse) {
af_array out = 0;
AF_THROW(af_transform(&out, in.get(), transform.get(), odim0, odim1, method,
inverse));
return array(out);
}
示例5: nearestNeighbour
void nearestNeighbour(array& idx, array& dist, const array& query,
const array& train, const dim_t dist_dim,
const unsigned n_dist, const af_match_type dist_type) {
af_array temp_idx = 0;
af_array temp_dist = 0;
AF_THROW(af_nearest_neighbour(&temp_idx, &temp_dist, query.get(),
train.get(), dist_dim, n_dist, dist_type));
idx = array(temp_idx);
dist = array(temp_dist);
}
示例6: diag
array diag(const array &in, const int num, const bool extract)
{
af_array res;
if (extract) {
AF_THROW(af_diag_extract(&res, in.get(), num));
} else {
AF_THROW(af_diag_create(&res, in.get(), num));
}
return array(res);
}
示例7: translate
array translate(const array& in, const float trans0, const float trans1,
const dim_t odim0, const dim_t odim1, const interpType method) {
af_array out = 0;
AF_THROW(
af_translate(&out, in.get(), trans0, trans1, odim0, odim1, method));
return array(out);
}
示例8: grad
void grad(array &rows, array &cols, const array &in) {
af_array rows_handle = 0;
af_array cols_handle = 0;
AF_THROW(af_gradient(&rows_handle, &cols_handle, in.get()));
rows = array(rows_handle);
cols = array(cols_handle);
}
示例9: susan
features susan(const array& in, const unsigned radius, const float diff_thr,
const float geom_thr, const float feature_ratio,
const unsigned edge) {
af_features temp;
AF_THROW(af_susan(&temp, in.get(), radius, diff_thr, geom_thr,
feature_ratio, edge));
return features(temp);
}
示例10: max
void max(array &val, array &idx, const array &in, const int dim)
{
af_array out = 0;
af_array loc = 0;
AF_THROW(af_imax(&out, &loc, in.get(), getFNSD(dim, in.dims())));
val = array(out);
idx = array(loc);
}
示例11: wrap
array wrap(const array& in, const dim_t ox, const dim_t oy, const dim_t wx,
const dim_t wy, const dim_t sx, const dim_t sy, const dim_t px,
const dim_t py, const bool is_column) {
af_array out = 0;
AF_THROW(
af_wrap(&out, in.get(), ox, oy, wx, wy, sx, sy, px, py, is_column));
return array(out);
}
示例12: harris
features harris(const array& in, const unsigned max_corners,
const float min_response, const float sigma,
const unsigned block_size, const float k_thr)
{
af_features temp;
AF_THROW(af_harris(&temp, in.get(), max_corners,
min_response, sigma, block_size, k_thr));
return features(temp);
}
示例13: fast
features fast(const array& in, const float thr, const unsigned arc_length,
const bool non_max, const float feature_ratio,
const unsigned edge)
{
af_features temp;
AF_THROW(af_fast(&temp, in.get(), thr, arc_length,
non_max, feature_ratio, edge));
return features(temp);
}
示例14: where
array where(const array& in)
{
if (gforGet()) {
AF_THROW_ERR("WHERE can not be used inside GFOR", AF_ERR_RUNTIME);
}
af_array out = 0;
AF_THROW(af_where(&out, in.get()));
return array(out);
}
示例15: exampleFunction
array exampleFunction(const array& a, const af_someenum_t p) {
// create a temporary af_array handle
af_array temp = 0;
// call C-API function
AF_THROW(af_example_function(&temp, a.get(), p));
// array::get() returns af_array handle for the corresponding cpp af::array
return array(temp);
}