tbb::flow::interface11::opencl_program< Factory >::file_reader Class Reference
Collaboration diagram for tbb::flow::interface11::opencl_program< Factory >::file_reader:

## Public Member Functions

| file_reader (const std::string &filepath)
const char * | content ()
size_t | length ()

## Private Attributes

std::string | my_content

## Detailed Description

### template<typename Factory = opencl_info::default_opencl_factory>
class tbb::flow::interface11::opencl_program< Factory >::file_reader

Definition at line 1257 of file flow_graph_opencl_node.h.

## Constructor & Destructor Documentation

## file_reader()

template<typename Factory = opencl_info::default_opencl_factory>

tbb::flow::interface11::opencl_program< Factory >::file_reader::file_reader | ( | const std::string & | filepath | ) |

inline

Definition at line 1259 of file flow_graph_opencl_node.h.

{
std::ifstream file_descriptor( filepath, std::ifstream::binary );
if ( !file_descriptor.is_open() ) {
std::string str = std::string( "Could not open file: " ) + filepath;
std::cerr << str << std::endl;
throw str;
}
file_descriptor.seekg( 0, file_descriptor.end );
size_t length = size_t( file_descriptor.tellg() );
file_descriptor.seekg( 0, file_descriptor.beg );
my_content.resize( length );
char* begin = &*my_content.begin();
file_descriptor.read( begin, length );
file_descriptor.close();
}

References begin, tbb::flow::interface11::opencl_program< Factory >::file_reader::length(), and tbb::flow::interface11::opencl_program< Factory >::file_reader::my_content.

Here is the call graph for this function:

## Member Function Documentation

## content()

template<typename Factory = opencl_info::default_opencl_factory>

const char* tbb::flow::interface11::opencl_program< Factory >::file_reader::content | ( |  | ) |

inline

Definition at line 1274 of file flow_graph_opencl_node.h.

{ return &*my_content.cbegin(); }

References tbb::flow::interface11::opencl_program< Factory >::file_reader::my_content.

Referenced by tbb::flow::interface11::opencl_program< Factory >::init().

Here is the caller graph for this function:

## length()

template<typename Factory = opencl_info::default_opencl_factory>

size_t tbb::flow::interface11::opencl_program< Factory >::file_reader::length | ( |  | ) |

inline

Definition at line 1275 of file flow_graph_opencl_node.h.

{ return my_content.length(); }

References tbb::flow::interface11::opencl_program< Factory >::file_reader::my_content.

Referenced by tbb::flow::interface11::opencl_program< Factory >::file_reader::file_reader(), and tbb::flow::interface11::opencl_program< Factory >::init().

Here is the caller graph for this function:

## Member Data Documentation

## my_content

template<typename Factory = opencl_info::default_opencl_factory>

std::string tbb::flow::interface11::opencl_program< Factory >::file_reader::my_content

private

Definition at line 1277 of file flow_graph_opencl_node.h.

Referenced by tbb::flow::interface11::opencl_program< Factory >::file_reader::content(), tbb::flow::interface11::opencl_program< Factory >::file_reader::file_reader(), and tbb::flow::interface11::opencl_program< Factory >::file_reader::length().

The documentation for this class was generated from the following file:

- flow_graph_opencl_node.h

tbb::flow::interface11::opencl_program::file_reader::length
size_t length()
Definition: flow_graph_opencl_node.h:1275
begin
void const char const char int ITT_FORMAT __itt_group_sync x void const char ITT_FORMAT __itt_group_sync s void ITT_FORMAT __itt_group_sync p void ITT_FORMAT p void ITT_FORMAT p no args __itt_suppress_mode_t unsigned int void size_t ITT_FORMAT d void ITT_FORMAT p void ITT_FORMAT p __itt_model_site __itt_model_site_instance ITT_FORMAT p __itt_model_task __itt_model_task_instance ITT_FORMAT p void ITT_FORMAT p void ITT_FORMAT p void size_t ITT_FORMAT d void ITT_FORMAT p const wchar_t ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s no args void ITT_FORMAT p size_t ITT_FORMAT d no args const wchar_t const wchar_t ITT_FORMAT s __itt_heap_function void size_t int ITT_FORMAT d __itt_heap_function void ITT_FORMAT p __itt_heap_function void void size_t int ITT_FORMAT d no args no args unsigned int ITT_FORMAT u const __itt_domain __itt_id ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain __itt_id ITT_FORMAT p const __itt_domain __itt_id __itt_timestamp begin
Definition: ittnotify_static.h:182
tbb::flow::interface11::opencl_program::file_reader::my_content
std::string my_content
Definition: flow_graph_opencl_node.h:1277

Copyright © 2005-2020 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its subsidiaries in the United States and other countries.

* Other names and brands may be claimed as the property of others.