Questions tagged [vectorization]
Use this tag if your code contains vectorized operations - where functions operate on whole arrays in one go. If it doesn't, but you want it to, then you should make those changes (perhaps with help from elsewhere) before presenting code for review.
6 questions with no upvoted or accepted answers
7
votes
0
answers
441
views
C# Generic high performance vectorized math operations
I'm writing a library which simplifies the usage of intrinsics in C#.
It's a generic library which supports all numeric types.
The goal of this library is to perform these operations at the highest ...
3
votes
0
answers
72
views
Optimising multiplication of matrix rows with matrix slice/page
I've recently vectorized most of the code for an optimization problem but this one still eludes me. As the procedure and not the actual values are important here, I have replaced the original matrices ...
3
votes
0
answers
314
views
Merging bin-data via a bin count threshold
When performing a chi-squared test, one takes the square of the differences of the expected counts per bin and observed counts per bin, and divides these per-bin differences by the expected counts per ...
2
votes
0
answers
43
views
Vectorize a function that, once per row, updates multiple rows in data.table
Requirements
I have a table of the different diagnoses a patient has received, with the date the diagnosis was first recorded. It so happens that in medicine, diagnoses are recorded as codes from a ...
1
vote
0
answers
141
views
Faster Tridiagonal Matrix Multiplication
I have a function that I've been trying to make faster that computes \$XA + B\$, where \$A \in \mathbb{R}^{n \times n}\$ is a tridiagonal matrix, and \$X, B \in \mathbb{R}^{m \times n}\$. In the code, ...
1
vote
0
answers
205
views
condensed nearest centroid classifier in numpy
This is my attempt to write a numpy-optimized version of a nearest centroid classifier to classify some images from the MNIST data set of handwritten digits. I am ...