Linux Coding related question 1 In there is a function diff
Linux Coding related question:
1) In <time.h>, there is a function difftime(). Why should we not use this function to time the operation of generate()?
2) What is the purpose of the generator.h file? Why is it necessary to have it?
Solution
1)
Difftime():Returns the difference of seconds between time1 and time2 (time1-time2).so it can\'t be used in generate.
2)Generator.h:
Generator is a class used to encapsulate the building of Funcs in user pipelines.It can be used for either purpose, but is especially convenient to use for AOT compilation.A Generator automatically detects the run-time parameters (Param/ImageParams) associated with the Func and (for AOT code) produces a function signature with the correct params in the correct order.It can also be customized via compile-time parameters (GeneratorParams), which affect code generation.
