質問編集履歴

1

書式を改善しました。

2024/10/23 12:22

投稿

kkjiji
kkjiji

スコア40

test CHANGED
File without changes
test CHANGED
@@ -159,7 +159,7 @@
159
159
 
160
160
  ##### 上記の詳細・結果
161
161
  元々実行できていたときは、main文の中になる
162
-
162
+ ```C++
163
163
  struct SharedMatAllocator {
164
164
  const cv::Mat mat;
165
165
  void* allocate(size_t bytes, size_t) {return bytes <= mat.rows * mat.step[0] ? mat.data : nullptr;}
@@ -189,6 +189,7 @@
189
189
  private:
190
190
  const cv::Mat img;
191
191
  };
192
+ ```
192
193
 
193
194
  しかし、OpenVINO2024のアップデートでAllocatorImplが削除されたことで使うことができなくなりました。
194
195
  OpenVINO2023から削除された部分を追記してみたのですが、
@@ -202,6 +203,7 @@
202
203
  class Tensor;
203
204
 
204
205
  #======下記追記したコード=========
206
+ ```C++
205
207
  /**
206
208
  * @interface AllocatorImpl
207
209
  * @deprecated This class will be removed in 2024.0 release
@@ -240,12 +242,14 @@
240
242
  * @return `true` if and only if memory allocated from one AllocatorImpl can be deallocated from the other and vice
241
243
  * versa
242
244
  */
245
+
243
246
  virtual bool is_equal(const AllocatorImpl& other) const = 0;
244
247
 
245
248
  protected:
246
249
  virtual ~AllocatorImpl() = default;
247
250
  };
248
251
  OPENVINO_SUPPRESS_DEPRECATED_END
252
+ ```
249
253
 
250
254
  ### 補足
251
255
  特になし