Method and device for calculating optimal number of threads
A thread count and thread count technology, applied in the field of optimal thread count calculation methods and devices, can solve problems such as process blockage and unreasonable use of resources, and achieve the effects of improving efficiency, reducing time-consuming conversion, and reducing running time
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
no. 1 example
[0038] This embodiment provides a method for calculating the optimal number of threads, through the thread loss c of each step i , a single thread takes time t i In relation to the total time-consuming T of the steps, the optimal number of threads for each step is calculated to minimize the total time-consuming T of each step, thereby reducing the time-consuming conversion.
[0039] see figure 2 , figure 2 A flow chart of the method for obtaining the optimal number of threads provided by this embodiment is shown. The method for obtaining the optimal number of threads includes steps S10-S30.
[0040] Step S10: Obtain the time-consuming step t of the single-threaded operation of each step i .
[0041] Run each step single-threaded, run each step of the entire transformation, set each step to run in single-threaded mode. Record the start time of each step and the end time of each step, and obtain the step time t of each step according to the start time and end time of eac...
no. 2 example
[0070] This embodiment provides an apparatus 200 for obtaining the optimal number of threads, which is applied to the electronic device and used to implement the method for obtaining the optimal number of threads described in the first embodiment.
[0071] It should be noted that the basic principle of the device 200 for obtaining the optimal number of threads provided in this embodiment is roughly the same as the method for obtaining the optimal number of threads provided in the first embodiment. Please refer to the relevant content in the first embodiment for detailed description.
[0072] see Figure 4 , Figure 4 A schematic diagram of functional modules of the apparatus 200 for calculating the optimal number of threads provided by this embodiment is shown.
[0073] The device 200 for obtaining the optimal number of threads includes an obtaining module 210 and a obtaining module 220 .
[0074] Wherein, the obtaining module 210 is used to obtain the thread switching loss...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com