Skip to content

Commit

Permalink
Modifications to common parameters functionality and main README file.
Browse files Browse the repository at this point in the history
  • Loading branch information
Konstantinos Krommydas committed Nov 22, 2013
1 parent cf1aa03 commit 64106ee
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
7 changes: 5 additions & 2 deletions README
Expand Up @@ -86,9 +86,12 @@ General format: ./<executable> [-p <platform> -d <device> | -t <type> --] [app-s
<device> :integer ID of device in <platform> to use
<type> : device type to use (0:CPU, 1:GPU, 2:MIC, 3:FPGA)

Example1: ./astar -p 0 -d 0 --
Example2: ./astar -t 0 --
Example1: ./astar -p 0 -d 0 -- (selects device with device ID 0 on platform with platform ID 0)
Example2: ./astar -t 0 -- (selects CPU device type on default platform with platform ID 0, if available)

Notes: If no parameters are supplied, default platform ID is 0 and default device type is CPU.
If -t parameter is given, default platform ID 0 is searched for supplied device type <type>. If not available, CPU device type selection will be attempted.
If device ID is unknown, a combination of -p and -t is available to search for device of selected <type> on platform ID <platform>.

Acknowledgements
----------------
Expand Down
4 changes: 2 additions & 2 deletions include/common_args.c
@@ -1,6 +1,6 @@
#include "common_args.h"

ocd_options _settings = {0, -1, -1};
ocd_options _settings = {0, -1, 0};
ocd_requirements _requirements = {0,0,0};
option* _options = NULL;

Expand Down Expand Up @@ -136,7 +136,7 @@ cl_device_id _ocd_get_device(int platform, int device, cl_int dev_type)
err = clGetDeviceIDs(platforms[platform], dev_type, 0, NULL, &nDevices);
if(err == CL_DEVICE_NOT_FOUND)
{
fprintf(stderr,"No Supported Device Found of Type %d. Falling back to CPU.\n",dev_type);
fprintf(stderr,"No supported device of requested type found. Falling back to CPU.\n");
dev_type = CL_DEVICE_TYPE_CPU;
err = clGetDeviceIDs(platforms[platform], dev_type, 0, NULL, &nDevices);
if(err == CL_DEVICE_NOT_FOUND){
Expand Down

0 comments on commit 64106ee

Please sign in to comment.