Home
last modified time | relevance | path

Searched refs:device_name (Results 1 – 25 of 266) sorted by relevance

1234567891011

/third_party/mindspore/mindspore/ccsrc/runtime/device/
Dkernel_runtime_manager.cc60 void KernelRuntimeManager::Register(const std::string &device_name, KernelRuntimeCreator &&runtime_… in Register() argument
61 if (runtime_creators_.find(device_name) == runtime_creators_.end()) { in Register()
62 (void)runtime_creators_.emplace(device_name, runtime_creator); in Register()
66 std::string KernelRuntimeManager::GetDeviceKey(const std::string &device_name, uint32_t device_id) { in GetDeviceKey() argument
67 std::string device_key = device_name + "_" + std::to_string(device_id); in GetDeviceKey()
71 KernelRuntime *KernelRuntimeManager::GetSingleKernelRuntime(const std::string &device_name, uint32_… in GetSingleKernelRuntime() argument
72 auto runtime_key = GetDeviceKey(device_name, device_id); in GetSingleKernelRuntime()
90 return GetKernelRuntime(device_name, device_id); in GetSingleKernelRuntime()
93 KernelRuntime *KernelRuntimeManager::GetKernelRuntime(const std::string &device_name, uint32_t devi… in GetKernelRuntime() argument
94 std::string runtime_key = GetDeviceKey(device_name, device_id); in GetKernelRuntime()
[all …]
Dkernel_runtime_manager.h36 void Register(const std::string &device_name, KernelRuntimeCreator &&runtime_creator);
37 KernelRuntime *GetKernelRuntime(const std::string &device_name, uint32_t device_id);
39 KernelRuntime *GetSingleKernelRuntime(const std::string &device_name, uint32_t device_id);
40 void ReleaseKernelRuntime(const std::string &device_name, uint32_t device_id);
48 std::string GetDeviceKey(const std::string &device_name, uint32_t device_id);
56 KernelRuntimeRegistrar(const std::string &device_name, KernelRuntimeCreator &&runtime_creator) { in KernelRuntimeRegistrar() argument
57 KernelRuntimeManager::Instance().Register(device_name, std::move(runtime_creator)); in KernelRuntimeRegistrar()
/third_party/mindspore/mindspore/ccsrc/cxx_api/
Dfactory.h42 void Register(const std::string &device_name, U &&creator) { in Register() argument
43 if (creators_.find(device_name) == creators_.end()) { in Register()
44 (void)creators_.emplace(device_name, creator); in Register()
48 bool CheckModelSupport(const std::string &device_name) { in CheckModelSupport() argument
50 … [&device_name](const std::pair<std::string, U> &item) { return item.first == device_name; }); in CheckModelSupport()
53 std::shared_ptr<T> Create(const std::string &device_name) { in Create() argument
54 auto iter = creators_.find(device_name); in Create()
60 MS_LOG(ERROR) << "Unsupported device target " << device_name; in Create()
75 Registrar(const std::string &device_name, U creator) { in Registrar() argument
76 Factory<T>::Instance().Register(device_name, std::move(creator)); in Registrar()
/third_party/gstreamer/gstplugins_good/sys/osxaudio/
Dgstosxaudiodeviceprovider.c45 const gchar * device_name, GstOsxAudioDeviceType type,
75 provider, AudioDeviceID device_id, const gchar * device_name, in gst_osx_audio_device_provider_probe_device() argument
90 device = gst_osx_audio_device_new (device_id, device_name, type, core_audio); in gst_osx_audio_device_provider_probe_device()
105 gchar *device_name = NULL; in _audio_device_get_name() local
127 device_name = (gchar *) g_malloc (propertySize); in _audio_device_get_name()
129 &deviceNameAddress, 0, NULL, &propertySize, device_name); in _audio_device_get_name()
131 g_free (device_name); in _audio_device_get_name()
132 device_name = NULL; in _audio_device_get_name()
136 return device_name; in _audio_device_get_name()
247 gchar *device_name; in gst_osx_audio_device_provider_probe_internal() local
[all …]
/third_party/toybox/toys/pending/
Dmdev.c41 char *device_name = 0, *custom_name = 0, *s, *temp; in make_device() local
73 device_name = getenv("DEVNAME"); in make_device()
75 if (!device_name) in make_device()
76 device_name = strrchr(path, '/') + 1; in make_device()
79 while ((temp = strchr(device_name, '!'))) { in make_device()
124 result=regexec(&match, device_name, 1, &off, 0); in make_device()
130 || off.rm_eo!=strlen(device_name)) in make_device()
195 device_name = NULL; in make_device()
224 if(device_name) { in make_device()
235 sprintf(toybuf, "/dev/%s", device_name); in make_device()
[all …]
/third_party/pulseaudio/src/modules/
Dreserve-wrap.c104 pa_reserve_wrapper* pa_reserve_wrapper_get(pa_core *c, const char *device_name) { in pa_reserve_wrapper_get() argument
115 pa_assert(device_name); in pa_reserve_wrapper_get()
117 t = pa_sprintf_malloc("reserve-wrapper@%s", device_name); in pa_reserve_wrapper_get()
148 device_name, in pa_reserve_wrapper_get()
155 pa_log_debug("Device '%s' already locked.", device_name); in pa_reserve_wrapper_get()
158 …pa_log_debug("Failed to acquire reservation lock on device '%s': %s", device_name, pa_cstrerror(-k… in pa_reserve_wrapper_get()
163 pa_log_debug("Successfully acquired reservation lock on device '%s'", device_name); in pa_reserve_wrapper_get()
247 pa_reserve_monitor_wrapper* pa_reserve_monitor_wrapper_get(pa_core *c, const char *device_name) { in pa_reserve_monitor_wrapper_get() argument
258 pa_assert(device_name); in pa_reserve_monitor_wrapper_get()
260 t = pa_sprintf_malloc("reserve-monitor-wrapper@%s", device_name); in pa_reserve_monitor_wrapper_get()
[all …]
Dreserve-monitor.c40 char *device_name; member
127 const char *device_name, in rm_watch() argument
147 if (!device_name) in rm_watch()
155 if (!(m->device_name = strdup(device_name))) { in rm_watch()
163 if (!(m->service_name = malloc(sizeof(SERVICE_PREFIX) + strlen(device_name)))) { in rm_watch()
167 sprintf(m->service_name, SERVICE_PREFIX "%s", m->device_name); in rm_watch()
231 free(m->device_name); in rm_release()
/third_party/e2fsprogs/misc/
De2freefrag.c180 retval = ext2fs_check_mount_point(fs->device_name, &mount_flags, in scan_online()
183 com_err(fs->device_name, retval, "while checking mount status"); in scan_online()
196 com_err(fs->device_name, errno, "while allocating memory"); in scan_online()
213 com_err(fs->device_name, errno, "while calling fsmap"); in scan_online()
327 static void close_device(char *device_name, ext2_filsys fs) in close_device() argument
332 com_err(device_name, retval, "while closing the filesystem.\n"); in close_device()
340 fprintf(f, "Device: %s\n", fs->device_name); in collect_info()
349 com_err(fs->device_name, retval, "while reading block bitmap"); in collect_info()
350 close_device(fs->device_name, fs); in collect_info()
356 com_err(fs->device_name, retval, "while dumping chunk info"); in collect_info()
[all …]
/third_party/mindspore/mindspore/ccsrc/frontend/parallel/
Dgroup_manager.cc74 bool GroupManager::CreateGroupByExecutor(const std::string &device_name, const std::string &group_n… in CreateGroupByExecutor() argument
81 auto executor = session::ExecutorManager::Instance().GetExecutor(device_name, device_id); in CreateGroupByExecutor()
87 bool GroupManager::DestroyGroupByExecutor(const std::string &device_name, const std::string &group_… in DestroyGroupByExecutor() argument
94 auto executor = session::ExecutorManager::Instance().GetExecutor(device_name, device_id); in DestroyGroupByExecutor()
104 std::string device_name = context_ptr->get_param<std::string>(MS_CTX_DEVICE_TARGET); in CreateGroups() local
106 auto executor = session::ExecutorManager::Instance().GetExecutor(device_name, device_id); in CreateGroups()
127 bool GroupManager::CreateGroupByExecutor(const std::string &device_name, const std::string &group_n… in CreateGroupByExecutor() argument
130 auto executor = parallel::ExecutorManager::Instance().GetExecutor(device_name, device_id); in CreateGroupByExecutor()
135 bool GroupManager::DestroyGroupByExecutor(const std::string &device_name, const std::string &group_… in DestroyGroupByExecutor() argument
138 auto executor = parallel::ExecutorManager::Instance().GetExecutor(device_name, device_id); in DestroyGroupByExecutor()
[all …]
/third_party/gstreamer/gstplugins_good/sys/v4l2/
Dgstv4l2deviceprovider.c42 const gchar * device_name, GstCaps * caps, GstV4l2DeviceType type,
103 const gchar * device_path, const gchar * device_name, GstStructure * props) in gst_v4l2_device_provider_probe_device() argument
181 device_name ? device_name : (gchar *) v4l2obj->vcap.card, caps, type, in gst_v4l2_device_provider_probe_device()
238 const gchar *device_name, *str; in gst_v4l2_device_provider_device_from_udev() local
279 device_name = g_udev_device_get_property (udev_device, "ID_V4L_PRODUCT"); in gst_v4l2_device_provider_device_from_udev()
280 if (!(device_name && *device_name)) { in gst_v4l2_device_provider_device_from_udev()
281 device_name = in gst_v4l2_device_provider_device_from_udev()
283 if (!(device_name && *device_name)) { in gst_v4l2_device_provider_device_from_udev()
284 device_name = g_udev_device_get_property (udev_device, "ID_MODEL_ENC"); in gst_v4l2_device_provider_device_from_udev()
285 if (!(device_name && *device_name)) { in gst_v4l2_device_provider_device_from_udev()
[all …]
Dv4l2-utils.c61 const gchar *device_name; in gst_v4l2_iterator_next() local
68 it->parent.device_name = NULL; in gst_v4l2_iterator_next()
76 device_name = g_udev_device_get_property (it->device, "ID_V4L_PRODUCT"); in gst_v4l2_iterator_next()
77 if (!device_name) in gst_v4l2_iterator_next()
78 device_name = g_udev_device_get_property (it->device, "ID_MODEL_ENC"); in gst_v4l2_iterator_next()
79 if (!device_name) in gst_v4l2_iterator_next()
80 device_name = g_udev_device_get_property (it->device, "ID_MODEL"); in gst_v4l2_iterator_next()
83 it->parent.device_name = device_name; in gst_v4l2_iterator_next()
/third_party/e2fsprogs/resize/
Dmain.c45 static char *device_name, *io_options; variable
332 device_name = argv[optind++]; in main()
338 io_options = strchr(device_name, '?'); in main()
352 retval = ext2fs_check_mount_point(device_name, &mount_flags, in main()
357 device_name); in main()
366 fd = ext2fs_open_file(device_name, O_RDWR, 0); in main()
369 device_name); in main()
377 device_name); in main()
386 device_name); in main()
409 retval = resize2fs_setup_tdb(device_name, undo_file, &io_ptr); in main()
[all …]
/third_party/mindspore/mindspore/ccsrc/backend/session/
Dsession_factory.cc27 void SessionFactory::Register(const std::string &device_name, SessionCreator &&session_creator) { in Register() argument
28 if (session_creators_.end() == session_creators_.find(device_name)) { in Register()
29 (void)session_creators_.emplace(device_name, session_creator); in Register()
33 std::shared_ptr<SessionBasic> SessionFactory::Create(const std::string &device_name) { in Create() argument
34 auto iter = session_creators_.find(device_name); in Create()
Dsession_factory.h32 void Register(const std::string &device_name, SessionCreator &&session_creator);
33 std::shared_ptr<SessionBasic> Create(const std::string &device_name);
44 SessionRegistrar(const std::string &device_name, SessionCreator &&session_creator) { in SessionRegistrar() argument
45 SessionFactory::Get().Register(device_name, std::move(session_creator)); in SessionRegistrar()
/third_party/mindspore/mindspore/ccsrc/ps/ps_cache/
Dps_cache_factory.cc27 void PsCacheFactory::Register(const std::string &device_name, PsCacheCreator &&ps_cache_creator) { in Register() argument
28 if (ps_cache_creators_.end() == ps_cache_creators_.find(device_name)) { in Register()
29 (void)ps_cache_creators_.emplace(device_name, ps_cache_creator); in Register()
33 std::shared_ptr<PsCacheBasic> PsCacheFactory::ps_cache(const std::string &device_name) { in ps_cache() argument
34 auto iter = ps_cache_creators_.find(device_name); in ps_cache()
Dps_cache_factory.h33 void Register(const std::string &device_name, PsCacheCreator &&ps_cache_creator);
34 std::shared_ptr<PsCacheBasic> ps_cache(const std::string &device_name);
45 PsCacheRegistrar(const std::string &device_name, PsCacheCreator &&ps_cache_creator) { in PsCacheRegistrar() argument
46 PsCacheFactory::Get().Register(device_name, std::move(ps_cache_creator)); in PsCacheRegistrar()
/third_party/gstreamer/gstplugins_bad/sys/dshowsrcwrapper/
Ddshowdeviceprovider.cpp39 const gchar * device_name, GstCaps * caps, const gchar * device_path,
86 return gst_dshow_device_new (info->device_index, info->device_name, in new_video_source()
204 g_free (device->device_name); in gst_dshow_device_finalize()
217 g_object_set (elem, "device-name", dev->device_name, NULL); in gst_dshow_device_create_element()
224 gst_dshow_device_new (guint device_index, const gchar * device_name, in gst_dshow_device_new() argument
231 g_return_val_if_fail (device_name, NULL); in gst_dshow_device_new()
251 "display-name", device_name, "caps", caps, "device-class", klass, NULL); in gst_dshow_device_new()
255 gstdev->device_name = g_strdup (device_name); in gst_dshow_device_new()
276 g_value_set_string (value, device->device_name); in gst_dshow_device_get_property()
301 device->device_name = g_value_dup_string (value); in gst_dshow_device_set_property()
Dgstdshow.cpp302 g_free (entry->device_name); in gst_dshow_device_entry_free()
303 entry->device_name = NULL; in gst_dshow_device_entry_free()
396 entry->device_name = friendly_name; in gst_dshow_enumerate_devices()
428 const gchar * device, const gchar * device_name, const gint device_index) in gst_dshow_select_device() argument
435 device_index, device_name, device); in gst_dshow_select_device()
446 } else if (!device && device_name && g_strcmp0 (device_name, entry->device_name) == 0) { in gst_dshow_select_device()
449 } else if (!device && !device_name && device_index == entry->device_index) { in gst_dshow_select_device()
458 selected->device_index, selected->device_name, selected->device); in gst_dshow_select_device()
489 gchar ** device_name, gint * device_index) in gst_dshow_getdevice_from_devicename() argument
534 if ((!*device_name || !**device_name) && devidx == *device_index) { in gst_dshow_getdevice_from_devicename()
[all …]
/third_party/alsa-utils/alsamixer/
Dcard_select.c40 char *device_name; member
54 if (card->device_name) { in on_key_enter()
55 if (select_card_by_name(card->device_name)) in on_key_enter()
94 free(card->device_name); in close_card_select_list()
116 first_card.device_name = "default"; in get_cards()
141 card->device_name = cstrdup(buf); in get_cards()
175 (!card->device_name || in create_list_items()
176 !strcmp(card->device_name, mixer_device_name))) in create_list_items()
/third_party/libusb/examples/
Dtestlibusb.c241 static int test_wrapped_device(const char *device_name) in test_wrapped_device() argument
246 fd = open(device_name, O_RDWR); in test_wrapped_device()
248 printf("Error could not open %s: %s\n", device_name, strerror(errno)); in test_wrapped_device()
253 printf("Error wrapping device: %s: %s\n", device_name, libusb_strerror(r)); in test_wrapped_device()
262 static int test_wrapped_device(const char *device_name) in test_wrapped_device() argument
264 (void)device_name; in test_wrapped_device()
272 const char *device_name = NULL; in main() local
282 device_name = argv[i]; in main()
294 if (device_name) { in main()
295 r = test_wrapped_device(device_name); in main()
/third_party/gstreamer/gstplugins_base/ext/alsa/
Dgstalsadeviceprovider.c31 static GstDevice *gst_alsa_device_new (const gchar * device_name,
54 gchar *device_name = g_strdup_printf ("hw:%d,%d", card, dev); in add_device() local
56 if (snd_pcm_open (&handle, device_name, stream, SND_PCM_NONBLOCK) < 0) { in add_device()
58 device_name); in add_device()
59 g_free (device_name); in add_device()
66 device_name, handle, template); in add_device()
91 device = gst_alsa_device_new (longname, caps, device_name, stream, props); in add_device()
299 gst_alsa_device_new (const gchar * device_name, in gst_alsa_device_new() argument
307 g_return_val_if_fail (device_name, NULL); in gst_alsa_device_new()
326 "display-name", device_name, "caps", caps, "device-class", klass, in gst_alsa_device_new()
/third_party/e2fsprogs/e2fsck/
Discan.c51 const char * device_name = NULL; variable
194 device_name = argv[optind]; in PRS()
196 int fd = open(device_name, O_RDONLY, 0); in PRS()
200 "while opening %s for flushing", device_name); in PRS()
205 "while trying to flush %s", device_name); in PRS()
224 retval = ext2fs_open(device_name, 0, in main()
228 device_name); in main()
/third_party/e2fsprogs/ext2ed/
Ddisk.c62 wprintw (command_win,"Error - Failed to seek to offset %ld in device %s\n",offset,device_name); in low_read()
68 wprintw (command_win,"Error - Failed to read from offset %ld in device %s\n",offset,device_name); in low_read()
118 wprintw (command_win,"Error - Failed to seek to offset %ld in device %s\n",offset,device_name); in low_write()
124 wprintw (command_win,"Error - Failed to write to offset %ld in device %s\n",offset,device_name); in low_write()
156 fprintf (fp,"Time: %s\nDevice: %s\n",ctime ((time_t *) &current_time),device_name); in log_changes()
/third_party/e2fsprogs/lib/ext2fs/
Ddupfs.c35 fs->device_name = 0; in ext2fs_dup_handle()
51 retval = ext2fs_get_mem(strlen(src->device_name)+1, &fs->device_name); in ext2fs_dup_handle()
54 strcpy(fs->device_name, src->device_name); in ext2fs_dup_handle()
/third_party/alsa-utils/bat/
Dalsa.c82 const char *device_name = snd_pcm_name(sndpcm->handle); in set_snd_pcm_params() local
97 device_name, snd_strerror(err), err); in set_snd_pcm_params()
107 device_name, snd_strerror(err), err); in set_snd_pcm_params()
116 device_name, snd_strerror(err), err); in set_snd_pcm_params()
127 device_name, snd_strerror(err), err); in set_snd_pcm_params()
140 device_name, snd_strerror(err), err); in set_snd_pcm_params()
163 device_name, snd_strerror(err), err); in set_snd_pcm_params()
173 device_name, snd_strerror(err), err); in set_snd_pcm_params()
193 device_name, snd_strerror(err), err); in set_snd_pcm_params()
203 device_name, snd_strerror(err), err); in set_snd_pcm_params()
[all …]

1234567891011