get_location - 2.5 日本語

Vitis AI ユーザー ガイド (UG1414)

Document ID
UG1414
Release Date
2022-06-15
Version
2.5 日本語

テンソル バッファーの位置を取得します。

プロトタイプ

location_t get_location();

パラメーター

なし。

戻り値

テンソル バッファーの位置、location_t enum 型の値。

次の表に、location_t enum 型を示します。

表 1. location_t enum 型
名称 説明
HOST_VIRT 0 ホストのみアクセス可能。
HOST_PHY 1 ホストとデバイスに共有される連続物理メモリ。
DEVICE_0 2 device_* のみアクセス可能。
DEVICE_1 3
DEVICE_2 4
DEVICE_3 5
DEVICE_4 6
DEVICE_5 7
DEVICE_6 8
DEVICE_7 9

使用法

vart::TensorBuffer* tb;
switch (tb->get_location()) {
            case vart::TensorBuffer::location_t::HOST_VIRT:
                  // do nothing
                  break;
            case vart::TensorBuffer::location_t::HOST_PHY:
                  // do nothing
                  break;
           default:
                  // do nothing
                  break;
      }