Statistical Analysis using a graphics processing unit
A data structure having plural elements may be divided into plural sections, each section including a portion of the plural elements. The data structure may include information related statistical analysis. Instructions may be generated to execute a function on the data structure on a section-by-section basis. These instructions may be executed by a graphics processing unit.
1 . A method, comprising:
dividing a data structure into plural sections, the data structure having plural elements, wherein each section comprises a portion of the plural elements, and wherein the data structure contains information related to statistical analysis;
generating instructions to execute a function on the data structure on a section-by-section basis; and
executing the instructions on a graphics processing unit (GPU).
2 . The method of claim 1 , wherein the data structure includes a matrix.
3 . The method of claim 2 further comprising storing the matrix into a table, wherein a particular row in the table corresponds to a particular section of the matrix.
4 . The method of claim 3 further comprising storing the matrix in column-major form in a memory associated with the GPU.
5 . The method of claim 1 , wherein the function comprises algebraic matrix operations.
6 . The method of claim 5 , wherein the function is created by a user to extend a database programming language.
7 . The method of claim 6 , wherein the database programming language is PostgreSQL.
8 . The method of claim 1 , wherein executing the instructions comprises invoking GPU libraries associated with the GPU.
9 . A system, comprising:
a processor;
a graphics processing unit (GPU); and
a storage to store instructions, which when executed by the processor, cause the processor to:
divide a data structure into plural sections, the data structure having plural elements, wherein each section comprises a portion of the plural elements, and wherein the data structure contains information related to statistical analysis;
generate particular instructions to execute a function on the data structure on a section-by-section basis; and
instruct the GPU to execute the particular instructions.
10 . The system of claim 9 , wherein the data structure includes a matrix.
11 . The system of claim 10 , wherein the instructions further cause the processor to store the matrix into a table, wherein a particular row in the table corresponds to a particular section of the matrix.
12 . The system of claim 11 , wherein the instructions further cause the processor to store the matrix in column-major form in the memory.
13 . The system of claim 9 , wherein the function comprises algebraic matrix operations.
14 . The system of claim 13 , wherein the function is created by a user to extend a database programming language.
15 . The system of claim 9 , wherein the database programming language is PostgreSQL.
16 . The system of claim 15 , wherein the data structure is a User-Defined Type (UDT) in PostgreSQL.
17 . A non-transitory computer readable medium to store instructions that, when executed by a processor, cause the processor to:
divide a data structure into plural sections, the data structure having plural elements, wherein each section comprises a portion of the plural elements, and wherein the data structure contains information related to statistical analysis;
generate particular instructions to execute a function on the data structure on a section-by-section basis; and
copy the data structure to a memory associated with a graphics processing unit (GPU), wherein the GPU is to execute the particular instructions on the data structure.
18 . The computer readable medium of claim 17 , wherein the data structure includes a matrix.
19 . The computer readable medium of claim 18 , wherein the instructions further cause the processor to store the matrix into a table, wherein a particular row in the table corresponds to a particular section of the matrix.
20 . The computer readable medium of claim 19 , wherein the instructions further cause the processor to store the matrix in column-major form in the memory.