# US 2026/0030710 A1 · Radix sort optimization based on upfront offset calculations

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2026/0030710 A1
- Document ID: US20260030710A1
- Status: Published application
- Kind: A1
- Application number: 18/784,255
- Filed: 2024-07-25
- Published: 2026-01-29
- Earliest claimed: 2024-07-25
- Assignees: QUALCOMM Incorporated
- Applicants: QUALCOMM Incorporated
- Inventors: Alexander Lauson ANGUS; Shangqing GU; Hongqiang WANG
- Web page: https://patentgrep.com/patent/US20260030710A1

## CPC

- G06T 1/20: Processor architectures; Processor configuration, e.g. pipelining
- G06T: IMAGE DATA PROCESSING OR GENERATION, IN GENERAL

## Abstract

This disclosure provides systems, devices, apparatus, and methods, including computer programs encoded on storage media, for radix sort optimization based on upfront offset calculations. A graphics processor may compute a plurality of histograms by counting radix digits of a set of data. The graphics processor may determine a plurality of global offsets over the computed plurality of histograms. The graphics processor may determine a plurality of local offsets based on the plurality of global offsets or refrain from determining the plurality of local offsets based on the plurality of global offsets. The graphics processor may sort the set of data based on the plurality of global offsets and the plurality of local offsets. The graphics processor may output an indicator of the sorted set of data.

## Claims

### Claim 1

An apparatus for graphics processing, comprising:
a memory; and
a processor coupled to the memory and, based at least in part on information stored in the memory, the processor is configured to:
compute a plurality of histograms by counting radix digits of a set of data;
determine a plurality of global offsets over the computed plurality of histograms;
determine a plurality of local offsets based on the plurality of global offsets or refrain from determining the plurality of local offsets based on the plurality of global offsets;
sort the set of data based on the plurality of global offsets and the plurality of local offsets; and
output an indicator of the sorted set of data.

### Claim 2 (depends on 1)

The apparatus of claim 1, wherein, to compute the plurality of histograms by counting the radix digits of the set of data and to determine the plurality of global offsets over the computed plurality of histograms, the processor is configured to:
execute a kernel based on the set of data to compute the plurality of histograms and determine the plurality of global offsets.

### Claim 3 (depends on 1)

The apparatus of claim 1, wherein, to determine the plurality of local offsets based on the plurality of global offsets or to refrain from determining the plurality of local offsets based on the plurality of global offsets, the processor is configured to:
perform a reduction over the plurality of global offsets; and refrain from determining the plurality of local offsets in response to the performed reduction indicating a uniformity.

### Claim 4 (depends on 3)

The apparatus of claim 3, wherein to perform the reduction over the plurality of global offsets, the processor is configured to:
perform a global offset scan to determine a prefix scan over the computed plurality of histograms; and reduce the prefix scan based on a uniformity index, wherein the reduced prefix scan indicates the uniformity.

### Claim 5 (depends on 1)

The apparatus of claim 1, wherein, to determine the plurality of local offsets based on the plurality of global offsets or to refrain from determining the plurality of local offsets based on the plurality of global offsets, the processor is configured to:
perform a reduction over the plurality of global offsets; and execute a plurality of kernels to determine the plurality of local offsets in response to the performed reduction indicating a non-uniformity.

### Claim 6 (depends on 5)

The apparatus of claim 5, wherein to perform the reduction over the plurality of global offsets, the processor is configured to:
perform a global offset scan to determine a prefix scan over the computed plurality of histograms; and reduce the prefix scan based on a uniformity index, wherein the reduced prefix scan indicates the non-uniformity.

### Claim 7 (depends on 1)

The apparatus of claim 1, wherein, to compute the plurality of histograms by counting the radix digits of the set of data, the processor is configured to:
split the set of data into a plurality of bit segments having a threshold number of bits; and count the threshold number of bits of the radix digits of the set of data for each pass of the plurality of bit segments.

### Claim 8 (depends on 1)

The apparatus of claim 1, wherein, to output the indicator of the sorted set of data, the processor is configured to at least one of:
store the indicator of the sorted set of data; or transmit the indicator of the sorted set of data.

### Claim 9 (depends on 1)

The apparatus of claim 1, wherein, to determine the plurality of global offsets over the computed plurality of histograms and to determine the plurality of local offsets or refrain from determining the plurality of local offsets, the processor is configured to:
calculate the plurality of global offsets over the computed plurality of histograms; and
calculate the plurality of local offsets or refrain from calculating the plurality of local offsets.

### Claim 10

A method of graphics processing, comprising:
computing a plurality of histograms by counting radix digits of a set of data; determining a plurality of global offsets over the computed plurality of histograms;
determining a plurality of local offsets based on the plurality of global offsets or refraining from determining the plurality of local offsets based on the plurality of global offsets; sorting the set of data based on the plurality of global offsets and the plurality of local offsets; and outputting an indicator of the sorted set of data.

### Claim 11 (depends on 10)

The method of claim 10, wherein computing the plurality of histograms by counting the radix digits of the set of data and determining the plurality of global offsets over the computed plurality of histograms comprises:
executing a kernel based on the set of data to compute the plurality of histograms and determine the plurality of global offsets.

### Claim 12 (depends on 10)

The method of claim 10, wherein determining the plurality of local offsets based on the plurality of global offsets or refraining from determining the plurality of local offsets based on the plurality of global offsets comprises:
performing a reduction over the plurality of global offsets; and
refraining from determining the plurality of local offsets in response to the performed reduction indicating a uniformity.

### Claim 13 (depends on 12)

The method of claim 12, wherein performing the reduction over the plurality of global offsets comprises:
performing a global offset scan to determine a prefix scan over the computed plurality of histograms; and
reducing the prefix scan based on a uniformity index, wherein the reduced prefix scan indicates the uniformity.

### Claim 14 (depends on 10)

The method of claim 10, wherein determining the plurality of local offsets based on the plurality of global offsets or refraining from determining the plurality of local offsets based on the plurality of global offsets comprises:
performing a reduction over the plurality of global offsets; and
executing a plurality of kernels to determine the plurality of local offsets in response to the performed reduction indicating a non-uniformity.

### Claim 15 (depends on 14)

The method of claim 14, wherein performing the reduction over the plurality of global offsets comprises:
performing a global offset scan to determine a prefix scan over the computed plurality of histograms; and
reducing the prefix scan based on a uniformity index, wherein the reduced prefix scan indicates the non-uniformity.

### Claim 16 (depends on 10)

The method of claim 10, wherein computing the plurality of histograms by counting the radix digits of the set of data comprises:
splitting the set of data into a plurality of bit segments having a threshold number of bits; and
counting the threshold number of bits of the radix digits of the set of data for each pass of the plurality of bit segments.

### Claim 17 (depends on 10)

The method of claim 10, wherein outputting the indicator of the sorted set of data comprises at least one of:
storing the indicator of the sorted set of data; or transmitting the indicator of the sorted set of data.

### Claim 18 (depends on 10)

The method of claim 10, wherein determining the plurality of global offsets over the computed plurality of histograms and determining the plurality of local offsets or refrain from determining the plurality of local offsets comprises:
calculating the plurality of global offsets over the computed plurality of histograms; and
calculating the plurality of local offsets or refrain from calculating the plurality of local offsets.

### Claim 19

A computer-readable medium storing computer executable code, the code when executed by a processor, causes the processor to:
compute a plurality of histograms by counting radix digits of a set of data;
determine a plurality of global offsets over the computed plurality of histograms;
determine a plurality of local offsets based on the plurality of global offsets or refrain from determining the plurality of local offsets based on the plurality of global offsets;
sort the set of data based on the plurality of global offsets and the plurality of local offsets; and
output an indicator of the sorted set of data.

### Claim 20 (depends on 19)

The computer-readable medium of claim 19, wherein, to compute the plurality of histograms by counting the radix digits of the set of data and to determine the plurality of global offsets over the computed plurality of histograms, the code, when executed by the processor, causes the processor to:
execute a kernel based on the set of data to compute the plurality of histograms and determine the plurality of global offsets.
