[gegl] bin: speed up some commands by not intializing opencl
- From: Øyvind Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] bin: speed up some commands by not intializing opencl
- Date: Tue, 20 Sep 2016 23:02:17 +0000 (UTC)
commit 8398c521911772774038db8e49fae4c0d67fc1ab
Author: Øyvind Kolås <pippin gimp org>
Date: Tue Sep 20 21:45:11 2016 +0200
bin: speed up some commands by not intializing opencl
bin/gegl-options.c | 15 ++++++++++++++-
bin/gegl.c | 2 +-
2 files changed, 15 insertions(+), 2 deletions(-)
---
diff --git a/bin/gegl-options.c b/bin/gegl-options.c
index e12c1ba..fd239cc 100644
--- a/bin/gegl-options.c
+++ b/bin/gegl-options.c
@@ -224,8 +224,14 @@ parse_args (int argc,
else if (match ("--list-all")) {
guint n_operations;
- gchar **operations = gegl_list_operations (&n_operations);
gint i;
+ gchar **operations;
+
+ /* initializing opencl for no use in this meta-data only query */
+ g_object_set (gegl_config (), "use-opencl", FALSE, NULL);
+ gegl_init (NULL, NULL);
+
+ operations = gegl_list_operations (&n_operations);
for (i = 0; i < n_operations; i++)
{
@@ -238,6 +244,9 @@ parse_args (int argc,
else if (match ("--exists")) {
gchar *op_name;
+ /* initializing opencl for no use in this meta-data only query */
+ g_object_set (gegl_config (), "use-opencl", FALSE, NULL);
+ gegl_init (NULL, NULL);
/* The option requires at least one argument. */
get_string (op_name);
@@ -255,6 +264,10 @@ parse_args (int argc,
gchar *op_name;
get_string (op_name);
+ /* initializing opencl for no use in this meta-data only query */
+ g_object_set (gegl_config (), "use-opencl", FALSE, NULL);
+ gegl_init (NULL, NULL);
+
if (gegl_has_operation (op_name))
{
gint i;
diff --git a/bin/gegl.c b/bin/gegl.c
index 7cdb950..2836859 100644
--- a/bin/gegl.c
+++ b/bin/gegl.c
@@ -95,8 +95,8 @@ main (gint argc,
"application-license", "GPL3",
NULL);
- gegl_init (NULL, NULL);
o = gegl_options_parse (argc, argv);
+ gegl_init (NULL, NULL);
#ifdef HAVE_SPIRO
gegl_path_spiro_init ();
#endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]