| 3302 | : StatefulNnApiDelegate(Options()) {} |
| 3303 | |
| 3304 | const StatefulNnApiDelegate::Options StatefulNnApiDelegate::GetOptions( |
| 3305 | TfLiteDelegate* delegate) { |
| 3306 | auto delegate_data = reinterpret_cast<Data*>(delegate->data_); |
| 3307 | StatefulNnApiDelegate::Options options; |
| 3308 | options.execution_preference = delegate_data->execution_preference; |
| 3309 | options.accelerator_name = delegate_data->accelerator_name.empty() |
| 3310 | ? nullptr |
| 3311 | : delegate_data->accelerator_name.c_str(); |
| 3312 | options.cache_dir = delegate_data->cache_dir.empty() |
| 3313 | ? nullptr |
| 3314 | : delegate_data->cache_dir.c_str(); |
| 3315 | options.model_token = delegate_data->model_token.empty() |
| 3316 | ? nullptr |
| 3317 | : delegate_data->model_token.c_str(); |
| 3318 | return options; |
| 3319 | } |
| 3320 | |
| 3321 | const std::vector<StatefulNnApiDelegate::MemoryRegistration>& |
| 3322 | StatefulNnApiDelegate::GetTensorMemoryMap(TfLiteDelegate* delegate) { |
no test coverage detected