Title: Copy function · Issue #1 · codebndr/MatrixMath · GitHub
Open Graph Title: Copy function · Issue #1 · codebndr/MatrixMath
X Title: Copy function · Issue #1 · codebndr/MatrixMath
Description: Hi @tzikis and @eecharlie I've been playing around with the MatrixMath library, and I have a very specific issue with the Copy function, which is giving me a huge headache: Here is a minimal example: float X[10][40][3]; //an array of 10 ...
Open Graph Description: Hi @tzikis and @eecharlie I've been playing around with the MatrixMath library, and I have a very specific issue with the Copy function, which is giving me a huge headache: Here is a minimal exampl...
X Description: Hi @tzikis and @eecharlie I've been playing around with the MatrixMath library, and I have a very specific issue with the Copy function, which is giving me a huge headache: Here is a minimal ex...
Opengraph URL: https://github.com/codebndr/MatrixMath/issues/1
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Copy function","articleBody":"Hi @tzikis and @eecharlie\r\n\r\nI've been playing around with the MatrixMath library, and I have a very specific issue with the **Copy** function, which is giving me a huge headache:\r\n\r\nHere is a minimal example:\r\n\r\n ```\r\n float X[10][40][3]; //an array of 10 matrices (40x3)\r\n \r\n //just fill it with 5's:\r\n for(int i=0; i\u003c10; i++){\r\n for (int j=0; j\u003c40; j++){\r\n for (int k=0; k\u003c3; k++){\r\n X[i][j][k] = 5.0;\r\n }\r\n }\r\n } \r\n\r\n float Q [10][40][3]; \r\n \r\n //now, I just want to copy the 1st matrix of X (located in X[0]) to Q[0]:\r\n Matrix.Copy( (float*)X[0], 3, 40, (float*)Q[0] );\r\n Serial.println(\"Copy done\");\r\n```\r\n\r\nWhile the compiler doesn't complain about this code, the program segfaults after the copy operation... \r\nCan you perhaps let me know why, and how can I solve this?\r\n\r\nI also noticed that the Copy function receives n (cols) first and m (rows) after, as opposed to all the other functions in the library. Do you know the reason for this design choice? I would recommend to change the order for easiness of use.\r\n\r\nThanks!","author":{"url":"https://github.com/davidbsp","@type":"Person","name":"davidbsp"},"datePublished":"2018-01-11T14:00:43.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/1/MatrixMath/issues/1"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:17928903-53a1-3933-829c-484514b631cf |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 83E8:261CBF:8FF33C:C150B5:69812C3A |
| html-safe-nonce | 9241e94e17ae842b19e59364098dda2c11a2ae14aabb9f2fe89f046ef80289af |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4M0U4OjI2MUNCRjo4RkYzM0M6QzE1MEI1OjY5ODEyQzNBIiwidmlzaXRvcl9pZCI6IjU1MzUxOTQ0MDIxOTQwMDkxNDYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 33e1a8db8f5795e05ecdb3ff9ae6112ca666bf66350e4ca746505e29809bcb67 |
| hovercard-subject-tag | issue:287795875 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/codebndr/MatrixMath/1/issue_layout |
| twitter:image | https://opengraph.githubassets.com/b2b9c9448e18a2d250ac19424e16890e6686f5d10e82635dce837254ff45f1cf/codebndr/MatrixMath/issues/1 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/b2b9c9448e18a2d250ac19424e16890e6686f5d10e82635dce837254ff45f1cf/codebndr/MatrixMath/issues/1 |
| og:image:alt | Hi @tzikis and @eecharlie I've been playing around with the MatrixMath library, and I have a very specific issue with the Copy function, which is giving me a huge headache: Here is a minimal exampl... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | davidbsp |
| hostname | github.com |
| expected-hostname | github.com |
| None | 39fe8101494cbb823c09b619b68c80cd4d05ab7279997038dbe06bb91608abe1 |
| turbo-cache-control | no-preview |
| go-import | github.com/codebndr/MatrixMath git https://github.com/codebndr/MatrixMath.git |
| octolytics-dimension-user_id | 1754900 |
| octolytics-dimension-user_login | codebndr |
| octolytics-dimension-repository_id | 32738751 |
| octolytics-dimension-repository_nwo | codebndr/MatrixMath |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 32738751 |
| octolytics-dimension-repository_network_root_nwo | codebndr/MatrixMath |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | d5b34a4e4898b066c629879feb4b184bc471d6a7 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width