transpose

Matrix Transpose (with shared Memory) with arbitary size on Cuda C

吃可爱长大的小学妹 提交于 2019-12-08 09:06:38
问题 I can't figure out a way to transpose a non-squared matrix using shared memory in CUDA C. (I am new to CUDA C and C) On the website: https://devblogs.nvidia.com/efficient-matrix-transpose-cuda-cc/ an efficient way was shown how to transpose a matrix (Coalesced Transpose Via Shared Memory). But it only works for squared matrices. Also Code is provided on github (same as on the blog). On Stackoverflow there is a similar question. There TILE_DIM = 16 is set. But with that implementation every

Transposing Table

走远了吗. 提交于 2019-12-08 08:54:20
问题 I've looking everywhere and have not finding anything useful. I have a table the captures assistance for employees. The table that looks like this: ID | DATE | ATTENDANCE ________________ 2524 | 20121001 | ASISTANCE 2525 | 20121001 | ABSCENCE 2526 | 20121001 | ASISTANCE 2527 | 20121001 | ASISTANCE 2524 | 20121002 | ASISTANCE 2525 | 20121002 | ABSCENCE 2526 | 20121002 | ASISTANCE 2527 | 20121002 | ASISTANCE 2524 | 20121003 | ASISTANCE 2525 | 20121003 | DAY OFF 2526 | 20121003 | DAY OFF 2527 |

Transpose the results of a MySQL query

Deadly 提交于 2019-12-08 06:39:46
问题 I'd like to transpose the results of a MySQL query from a per row key => value resultset to a resultset where the key is the column header and the value is a row entry for that column. i.e. Given the following data |------------------+-------------| | CLASS_LESSON | ATTENDANTS | |------------------+-------------| | class1art | 1 | | class1history | 1 | | class2geography | 2 | |------------------+-------------| I'd like to transform it to |------------+---------------+------------------| |

Pivot or transpose a table in SQL Server without GROUPING BY

半城伤御伤魂 提交于 2019-12-08 02:47:58
问题 I need to pivot a table in SQL Server with the following structure: CREATE TABLE table1 ( ColumnNumber int, RowNumber int, CellData nvarchar(50) ) INSERT INTO table1 VALUES (1, 1, 'Orange'), (2, 1, 'Apple'), (3, 1, 'Banana'), (1, 2, 'Grape'), (2, 2, 'Corn'), (3, 2, 'Lemon'), (1, 3, 'Tomato'), (2, 3, 'Lettuce'), (3, 3, 'Onion') And I need the resulting table to look like this: So the cells in ColumnNumber row are now the Column Names of the resulting table. The hardest part is that the amount

MATLAB: Block matrix multiplying without loops

蹲街弑〆低调 提交于 2019-12-08 01:48:28
问题 I have a block matrix [A B C...] and a matrix D (all 2-dimensional). D has dimensions y-by-y, and A, B, C , etc are each z-by-y. Basically, what I want to compute is the matrix [D*(A'); D*(B'); D*(C');...] , where X ' refers to the transpose of X . However, I want to accomplish this without loops for speed considerations. I have been playing with the reshape command for several hours now, and I know how to use it in other cases, but this use case is different from the other ones and I cannot

Transpose and group data

佐手、 提交于 2019-12-07 15:58:43
问题 I need to transpose two column in rows, and group by first column; here is an example. From this: A B IP1 21 IP1 22 IP1 23 IP2 80 IP2 443 IP3 21 IP3 22 IP3 23 IP3 80 IP3 443 To this: A B C D E F IP1 21 22 23 IP2 80 443 IP3 21 22 23 80 443 How can I do this? Can I avoid the use of macro and VBA? 回答1: You better use VBA , but if you really need formula solution: First, you need to create Unique list: D2=IFERROR(INDEX($A$1:$A$19, MATCH(0, COUNTIF($D$1:D1, $A$1:$A$19), 0)),0) And drag it down to

SQL server: Transpose Rows to Columns (n:m relationship)

白昼怎懂夜的黑 提交于 2019-12-07 14:40:49
问题 After trying it myself for some hours now I need to ask for help. I only did some basic SQL until now. I want to solve the following: (I have translated a couple of things for you to understand the context) I have three tables: Workers (Mitarbeiter in German - mitID) | mitID | Name | FamName | DOB | abtIDref | |-------|--------|---------|------------|----------| | 1 | Frank | Sinatra | 12.12.1915 | 1 | | 2 | Robert | Downey | 4.4.1965 | 2 | INFO: abtIDref is an 1:n relation for the Workplace

Non-square matrix transpose with shared mem in CUDA

自古美人都是妖i 提交于 2019-12-07 14:26:18
问题 I was trying to get a variation of the SDK matrix transpose sample for all kind of sizes. Briefly, I have to take an input array (double *a) and write it on two different parts (you will notice the different offsets) of a bigger matrix (double *tab). I'm storing the data in row-major format so I'm using this macro for indexing: #define IDX2L(i,j,ld) (((i)*ld))+(j)) // 0 based index +row-major format This is the simple code I use. __global__ void cuda_a_Coalesced(double *tab, int tab_rows, int

WMI HDD Serial Number Transposed

。_饼干妹妹 提交于 2019-12-07 04:18:59
问题 I have some code to fetch a hard drive serial number from the WMI. SelectQuery selectQuery = new SelectQuery("Win32_PhysicalMedia"); ManagementObjectSearcher searcher = new ManagementObjectSearcher(selectQuery); foreach (ManagementObject wmi_PM in searcher.Get()) { string str = wmi_PM["SerialNumber"]; } At first I thought it was working and retrieved the correct serial number. After trying to use it with a comparison though, I found out the number the WMI reports is not exactly correct. The

Pivoting rows into columns in SQL Server

故事扮演 提交于 2019-12-06 12:47:38
问题 I have a set of data that looks like this: Before FirstName LastName Field1 Field2 Field3 ... Field27 --------- -------- ------ ------ ------ ------- Mark Smith A B C D John Baptist X T Y G Tom Dumm R B B U However, I'd like the data to look like this: After FirstName LastName Field Value --------- -------- ----- ----- Mark Smith 1 A Mark Smith 2 B Mark Smith 3 C Mark Smith 4 D John Baptist 1 X John Baptist 2 T John Baptist 3 Y John Baptist 4 G Tom Dumm 1 R Tom Dumm 2 B Tom Dumm 3 B Tom Dumm