Modifying the Source Code
- Click View Suggested Source Code in the lower part of the source code porting report. See Figure 1.
- Under File list on the left, switch between files to view the source code modification suggestions. See Figure 2.
- According to the porting report, five files need to be modified. On the Source Code Porting Suggestions page, check the modification suggestions for each file and modify the source code based on the suggestions.
Modifying Makefile
On the Source Code Porting Suggestions page, view the suggestions for modifying the Makefile file. See the following figure:
According to the preceding suggestions, add -march=armv8.2-a -fsigned-char to the FLAGS variable in Makefile.
This sample uses Kunpeng 920 as an example. The compilation options may vary depending on the platform.
Obtain the Kunpeng system library (version 2.3.1) from the link in the suggestion and install the library. Add -I /usr/local/ksl/include/ -L /usr/local/ksl/lib/ -lavx2ki -lm to the end of the FLAGS variable.
Figure 5 shows the new code (the x86_64 branch and AArch64 branch are distinguished during the modification).
Modifying file_lock.c
On the Source Code Porting Suggestions page, view the suggestions for modifying file_lock.c. There are three modification points. See Figure 6.
- Figure 7 shows the porting suggestion.
Click Quick Fix > Replace with Suggested Code. See Figure 8.
Check whether the replacement code in Suggestion is proper based on the note in Description.
If the replacement code is proper, delete the comment characters (//). Figure 9 shows the new code.
- Figure 10 shows the porting suggestion.
Click Quick Fix > Replace with Suggested Code. See Figure 11.
- Figure 12 shows the porting suggestion.
Click Quick Fix > Replace with Suggested Code. See Figure 13.
Check whether the replacement code in Suggestion is proper based on the note in Description.
If the replacement code is proper, delete the comment characters (//). Figure 14 shows the new code.
Modifying ksw.c
On the Source Code Porting Suggestions page, view the suggestions for modifying ksw.c. See Figure 15.
The preceding information is about the usage of the intrinsic function. According to the suggestions, add the avx2ki.h header file to ksw.c. Figure 16 shows the new code.
Modifying ksw.h
On the Source Code Porting Suggestions page, view the suggestions for modifying ksw.h. There are two modification points. See Figure 17.




















