ONE - On-device Neural Engine
Loading...
Searching...
No Matches
tfkit Namespace Reference

Namespaces

namespace  tf
 

Data Structures

class  CmdArguments
 
struct  ConvertCommand
 
struct  DecodeCommand
 
struct  EncodeCommand
 
class  IOConfiguration
 
struct  PackCommand
 
struct  UnpackCommand
 

Functions

std::unique_ptr< IOConfigurationmake_ioconfig (const CmdArguments &cmdargs)
 

Function Documentation

◆ make_ioconfig()

std::unique_ptr< IOConfiguration > tfkit::make_ioconfig ( const CmdArguments cmdargs)

Definition at line 111 of file Support.cpp.

112{
113 auto iocfg = std::make_unique<IOConfiguration>();
114
115 auto in = open_fstream<std::ifstream>(cmdargs.get_or(0, "-"), std::ios::in | std::ios::binary);
116 iocfg->in(std::move(in));
117
118 auto out = open_fstream<std::ofstream>(cmdargs.get_or(1, "-"), std::ios::out | std::ios::binary);
119 iocfg->out(std::move(out));
120
121 return iocfg;
122}
std::string get_or(unsigned int index, const std::string &) const
Definition Support.cpp:103

References tfkit::CmdArguments::get_or().

Referenced by tfkit::ConvertCommand::run(), tfkit::DecodeCommand::run(), tfkit::EncodeCommand::run(), tfkit::PackCommand::run(), and tfkit::UnpackCommand::run().