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

Pending Publication Date: 2022-03-25
SHENZHEN ARASHI VISION CO LTD
View PDF0 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] The purpose of the present invention is to provide a cross-platform code compilation method, system, device and storage medium, aiming to solve the problem of low development efficiency due to the need to write two codes for different platforms at the same time in the prior art

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Cross-platform GPU (Graphics Processing Unit) parallel computing framework, code coding and compiling method and equipment
  • Cross-platform GPU (Graphics Processing Unit) parallel computing framework, code coding and compiling method and equipment
  • Cross-platform GPU (Graphics Processing Unit) parallel computing framework, code coding and compiling method and equipment

Examples

Experimental program
Comparison scheme
Effect test

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 ...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention is applicable to the technical field of computers, and provides a cross-platform GPU (graphics processing unit) parallel computing framework, a code encoding method, a code compiling method, equipment and a storage medium, the cross-platform GPU parallel computing framework is packaged with a first API (application program interface), a second API and a language compiling module, and the language compiling module is used for compiling the first coloring language code into the second coloring language code, so that the conversion of multi-platform codes is realized through the cross-platform GPU parallel computing framework, the software development efficiency is improved, and the consistency of cross-platform codes is ensured.

Description

technical field [0001] The invention belongs to the technical field of computers, and in particular relates to a cross-platform GPU parallel computing framework, a code encoding method, a code compiling method, equipment and a storage medium. Background technique [0002] Code compilation is the process of translating the code of the source program written in the high-level language into the code of the binary language (machine language) recognizable by the computer. In the prior art, due to the incompatibility between graphics and computing APIs (Application Programming Interface) supported by different platforms, in order to achieve the same function, it is usually necessary to write two codes, which leads to cross-platform code writing process. Reduced development efficiency. Contents of the invention [0003] The purpose of the present invention is to provide a cross-platform code compilation method, system, device and storage medium, aiming to solve the problem of lo...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
IPC IPC(8): G06F8/41
CPCG06F8/41G06F8/44
Inventor 李祥瑞肖龙报
Owner SHENZHEN ARASHI VISION CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products