Cross-platform GPU (Graphics Processing Unit) parallel computing framework, code coding and compiling method and equipment
A parallel computing and cross-platform technology, applied in the computer field, can solve the problems of low development efficiency and achieve the effect of ensuring consistency and improving software development efficiency
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0032] figure 1 The cross-platform GPU parallel computing framework provided by the first embodiment of the present invention is shown. For the convenience of description, only the parts related to the embodiment of the present invention are shown. The details are as follows:
[0033] The cross-platform GPU (Graphics Processing Unit, Graphics Processing Unit) parallel computing framework 1 provided by the embodiment of the present invention is packaged with a first API 10, a second API 11, and a language compilation module 12, wherein the language compilation module is used to convert the first rendering The language code compiles to the second shading language code. It should be pointed out here that the cross-platform GPU parallel computing framework can also encapsulate more APIs at the same time, which is not limited here.
[0034] Wherein, the shading language includes GLSL (OpenGL Shading Language, OpenGL Shading Language) for OpenGL, MSL (Metal Shading Language) for Me...
Embodiment 2
[0049] The second embodiment is based on the first embodiment, figure 2 The implementation process of the cross-platform code encoding method provided by the second embodiment of the present invention is shown. For the convenience of description, only the parts related to the embodiment of the present invention are shown, and the details are as follows:
[0050] In step S201, the source code for simultaneously calling the first API and the second API is obtained, the source code includes the first coloring language code.
[0051] Embodiments of the present invention are applicable to computing devices. For ease of description, in this embodiment, the shading language used by the first API is defined as the first shading language, and the shading language used by the second API is defined as the second shading language.
[0052] As shown in the following pseudo code, the first API is Vulkan, and the second API is Metal. When creating a device, the source code is as shown in t...
Embodiment 3
[0062] image 3 The implementation process of the cross-platform code compilation method provided by the third embodiment of the present invention is shown. For the convenience of description, only the parts related to the embodiment of the present invention are shown, and the details are as follows:
[0063] In step S301, the API corresponding to the precompiled macro is determined.
[0064] In the embodiment of the present invention, the precompiled macro is a condition variable that can provide the compiler with a basis for judgment. In specific implementation, different precompiled macros can be defined in the compiler corresponding to the first API and the second API respectively. In the code compilation phase, the code to be compiled is determined according to the API corresponding to the precompiled macro. For example, if the target platform is Android or Windows, add the -D__USE_VULKAN__ parameter to the compiler to define the __USE_VULKAN__ precompiled macro. In the ...
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