Unlock instant, AI-driven research and patent intelligence for your innovation.

Byte alignment method, device and computer-readable storage medium

A byte alignment and computer program technology, applied in the computer field, can solve problems such as low efficiency and low accuracy of byte alignment, and achieve the effect of improving accuracy and efficiency

Active Publication Date: 2020-06-30
GUANGZHOU KUGOU COMP TECH CO LTD
View PDF5 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] Embodiments of the present application provide a byte alignment method, device, and computer-readable storage medium, which can be used to solve the problems of low accuracy and low efficiency in determining alignment bytes in related technologies

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
  • Byte alignment method, device and computer-readable storage medium
  • Byte alignment method, device and computer-readable storage medium
  • Byte alignment method, device and computer-readable storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0058] In order to make the object, technical solution and advantages of the present invention clearer, the implementation manner of the present invention will be further described in detail below in conjunction with the accompanying drawings.

[0059] Before explaining and describing the embodiment of the present invention in detail, the application scenarios involved in the embodiment of the present invention are respectively explained and described.

[0060]At present, when the terminal needs to read the data in the memory, if the terminal can read 4 bytes of data at a time, and the current target data to be read is 4 bytes of data, then when the target data is stored It just crosses the access boundary. For example, the access boundary includes 3 bytes, and the remaining 1 byte is outside the access boundary. When the terminal reads the target data, it can only read the target data for the first time. 3 bytes of data, and the remaining 1 byte of data needs to be read again...

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 discloses a byte alignment method and device and a computer readable storage medium, and belongs to the technical field of computers. The method includes: determining an inverse number of a target byte number, wherein the target byte number is a byte number of target data to be aligned stored in memory; determining an alignment byte based on the inverse number of the target byte number and a preset displacement value, wherein the alignment byte is used for describing the location where the target data are stored; and storing the target data based on the alignment byte to completebyte alignment. The alignment byte can be determined by using the inverse number of the target byte number and the preset displacement value without floating-point operations, thereby improving the accuracy and efficiency of determining the alignment byte, and improving the accuracy and efficiency of the alignment of the target data based on the alignment byte.

Description

technical field [0001] The present invention relates to the field of computer technology, in particular to a byte alignment method, device and computer-readable storage medium. Background technique [0002] In order to improve the efficiency of reading data from memory, data in memory usually needs to be byte-aligned. Byte alignment refers to storing data according to specific rules, that is, each data has its own alignment byte, and the data must be stored in a position that conforms to the alignment byte. When the bytes are not aligned, the computer may need to perform multiple data fetch operations from the memory to fetch the target data. For example, when the target data is int type data, if the target data is stored in memory as 4 bytes Alignment, that is to say, all the data of an int falls within the interval of one fetch by the computer, so it only needs to be fetched once. If it is not aligned, that is, the int data just crosses the boundary of the number, and th...

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
Patent Type & Authority Patents(China)
IPC IPC(8): G06F9/30G06F3/06
Inventor 谢元烨黄少滨
Owner GUANGZHOU KUGOU COMP TECH CO LTD