| Top |
| #define | UFO_RESOURCES_CHECK_CLERR() |
| #define | UFO_RESOURCES_CHECK_AND_SET() |
| UfoResources * | ufo_resources_new () |
|
|
ufo_resources_add_path () |
|
|
ufo_resources_get_kernel () |
|
|
ufo_resources_get_kernel_with_opts () |
|
|
ufo_resources_get_cached_kernel () |
|
|
ufo_resources_get_kernel_from_source_with_opts () |
|
|
ufo_resources_get_kernel_from_source () |
|
|
ufo_resources_get_kernel_source () |
|
|
ufo_resources_get_context () |
|
|
ufo_resources_get_cmd_queues () |
|
|
ufo_resources_get_devices () |
|
|
ufo_resources_get_gpu_nodes () |
|
|
ufo_resources_get_remote_nodes () |
| const |
ufo_resources_clerr () |
|
|
ufo_resources_error_quark () |
| UfoDeviceType | device-type | Read / Write / Construct Only |
| platform-index | Read / Write | |
|
|
remotes | Read / Write |
| #define | UFO_RESOURCES_ERROR |
| enum | UfoResourcesError |
| enum | UfoDeviceType |
| struct | UfoResources |
| struct | UfoResourcesClass |
The UfoResources creates the OpenCL environment and loads OpenCL kernels
from disk or directly as a string. By default the kernel search path is in
$datadir/ufo but can be extended by the UFO_KERNEL_PATH environment
variable.
#define UFO_RESOURCES_CHECK_CLERR(error)
Check the return value of OpenCL functions and issue a warning with file and line number if an error occurred.
#define UFO_RESOURCES_CHECK_AND_SET(error, g_error_loc)
Check error
and set g_error_loc
accordingly.
UfoResources *
ufo_resources_new (GError **error);
Create a new UfoResources instance.
gpointer ufo_resources_get_kernel (UfoResources *resources,const,gchar *filenameconst,gchar *kernel);GError **error
Loads and builds a kernel from a file. The file is searched in the current
working directory and all paths added through ufo_resources_add_path(). If
kernel
is NULL
resources |
A UfoResources object |
|
filename |
Name of the .cl kernel file |
|
kernel |
Name of a kernel, or |
|
error |
Return location for a GError from UfoResourcesError, or |
gpointer ufo_resources_get_kernel_with_opts (UfoResources *resources,const,gchar *filenameconst,gchar *kernel_nameconst,gchar *options);GError **error
Loads a and builds a kernel from a file. The file is searched in the current
working directory and all paths added through ufo_resources_add_paths()UFO_KERNEL_PATH environment variable. If
kernel
is NULL
resources |
A UfoResources object |
|
filename |
Name of the .cl kernel file |
|
kernel_name |
Name of a kernel, or |
|
options |
Options passed to the OpenCL compiler |
|
error |
Return location for a GError from UfoResourcesError, or |
gpointer ufo_resources_get_cached_kernel (UfoResources *resources,const,gchar *filenameconst,gchar *kernel);GError **error
Loads a and builds a kernel from a file. The file is searched in the current
working directory and all paths added through ufo_resources_add_path(). If
kernel
is NULL
resources |
A UfoResources object |
|
filename |
Name of the .cl kernel file |
|
kernel |
Name of a kernel, or |
|
error |
Return location for a GError from UfoResourcesError, or |
gpointer ufo_resources_get_kernel_from_source_with_opts (UfoResources *resources,const,gchar *sourceconst,gchar *kernelconst,gchar *options);GError **error
Loads and builds a kernel from a string. If kernel
is NULLsource
is used.
resources |
||
source |
OpenCL source string |
|
kernel |
Name of a kernel or |
|
options |
Options passed to the OpenCL compiler |
|
error |
Return location for a GError from UfoResourcesError, or NULL |
gpointer ufo_resources_get_kernel_from_source (UfoResources *resources,const,gchar *sourceconst,gchar *kernel);GError **error
Loads and builds a kernel from a string. If kernel
is NULLsource
is used.
resources |
||
source |
OpenCL source string |
|
kernel |
Name of a kernel or |
|
error |
Return location for a GError from UfoResourcesError, or NULL |
gchar * ufo_resources_get_kernel_source (UfoResources *resources,const,gchar *filename);GError **error
Loads a file present in the kernel PATH search list. The file is searched in the current
working directory and all paths added through ufo_resources_add_path().
resources |
A UfoResources object |
|
filename |
Name of the .cl kernel file |
|
error |
Return location for a GError from UfoResourcesError, or |
gpointer ufo_resources_get_context (UfoResources *resources);
Returns the OpenCL context object that is used by the resource resources. This context can be used to initialize othe third-party libraries.
[skip]
GList * ufo_resources_get_cmd_queues (UfoResources *resources);
Get all command queues managed by resources
.
[skip]
GList * ufo_resources_get_devices (UfoResources *resources);
Get all devices queues managed by resources
.
[skip]
GList * ufo_resources_get_gpu_nodes (UfoResources *resources);
Get all UfoGpuNode objects managed by resources
.
List with
UfoGpuNode objects. Free with g_list_free()
[transfer container][element-type Ufo.GpuNode]
GList * ufo_resources_get_remote_nodes (UfoResources *resources);
Get all resources
.
constgchar * ufo_resources_clerr ();int error
Get a human-readable string representation of error
.
OpenCL related errors.
struct UfoResources;
Manages OpenCL resources. The contents of the UfoResources structure are private and should only be accessed via the provided API.
“device-type” property“device-type” UfoDeviceType
Type of the devices that should be used exclusively for computation.
See: UfoDeviceType for the device classes.
Flags: Read / Write / Construct Only
Default value: UFO_DEVICE_GPU
“platform-index” property“platform-index”gint
Platform index, -1 denotes any platform.
Flags: Read / Write
Allowed values: [-1,16]
Default value: 0