Class that handles command-line options. More...
#include <options.hpp>
Public Member Functions | |
| options (int argc, char *argv[]) | |
| Constructor. | |
| ~options () | |
| Destructor. | |
| const std::string & | clpath () const |
| Return path to OpenCL dynamic library. | |
| bool | info () const |
| Returns true if the user requested info. | |
| bool | build () const |
| Returns true if an OpenCL source file was specified on the command line. | |
| cl_device_type | device_type () const |
| Returns the selected device type. | |
| const std::string & | cloptions () const |
| Returns the OpenCL compiler options specified on the command line. | |
| const std::vector< std::string > & | input_files () const |
| Returns the OpenCL source files specified on the command line. | |
| const std::string & | output_file () const |
| Returns the filename for output binaries. | |
| const std::string & | platform_name_filter () const |
| Returns a platform name filter used to select a platform. | |
| const std::string & | device_name_filter () const |
| Returns a device name filter used to select a device. | |
| int | platform_index () const |
| Returns the index of the platform to target. | |
| int | device_index () const |
| Returns the index of the device to target. | |
| bool | add_headers () const |
| Add CLCC headers to output binaries. | |
Private Types | |
|
typedef boost::program_options::variables_map | variables_map_t |
| Short-hand variable map type. | |
Private Attributes | |
| variables_map_t | variables_ |
| Variable map. | |
| std::string | clpath_ |
| Path to OpenCL dynamic library. | |
| bool | info_ |
| Information request flag. | |
| bool | build_ |
| Build flag. | |
| cl_device_type | device_type_ |
| Device type to build for. | |
| std::string | cloptions_ |
| OpenCL compiler options. | |
| std::string | platform_name_filter_ |
| Platform name filter. | |
| std::string | device_name_filter_ |
| Device name filter. | |
| std::string | output_file_ |
| Name out binary output file. | |
| int | platform_index_ |
| Index of platform to build for or CLCC_ALL_PLATFORMS. | |
| int | device_index_ |
| Index of device to build for or CLCC_ALL_DEVICES. | |
| bool | add_headers_ |
| Add CLCC headers to output binaries. | |
Class that handles command-line options.
| options::options | ( | int | argc, |
| char * | argv[] | ||
| ) |
Constructor.
| argc | number of arguments |
| argv | array of zero-terminated strings containing the actual arguments |
The constructor will parse and process all arguments. If an error occurs, it will throw an exception.
| const vector< string > & options::input_files | ( | ) | const |
Returns the OpenCL source files specified on the command line.
1.7.2