Home ⌂Doc Index ◂Up ▴
Intel(R) Threading Building Blocks Doxygen Documentation  version 4.2.3
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 1271 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 1273 of file flow_graph_opencl_node.h.

1273  {
1274  std::ifstream file_descriptor( filepath, std::ifstream::binary );
1275  if ( !file_descriptor.is_open() ) {
1276  std::string str = std::string( "Could not open file: " ) + filepath;
1277  std::cerr << str << std::endl;
1278  throw str;
1279  }
1280  file_descriptor.seekg( 0, file_descriptor.end );
1281  size_t length = size_t( file_descriptor.tellg() );
1282  file_descriptor.seekg( 0, file_descriptor.beg );
1283  my_content.resize( length );
1284  char* begin = &*my_content.begin();
1285  file_descriptor.read( begin, length );
1286  file_descriptor.close();
1287  }
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

References begin, and length.

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 1288 of file flow_graph_opencl_node.h.

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 1289 of file flow_graph_opencl_node.h.

Referenced by 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 1291 of file flow_graph_opencl_node.h.


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

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.