Recent content by SpiffyEh
-
S
Help with cblas_dgemm matrix multiplication
Thanks for the help, I appreciate you spending time on trying to figure this out. I ended up figuring out that the pos matrix needed to be translated so the second parameter was CblasTrans and I needed to make tempPos larger and it worked.- SpiffyEh
- Post #7
- Forum: Programming and Computer Science
-
S
Help with cblas_dgemm matrix multiplication
all of the arrays i said the dimensions for are in row major or are supposed to be. I can't change the pos array dimensions or the rest of the program will break. It's written by someone else as a simulation and is pretty long, I'm just adding averages and a couple other things to it. I can...- SpiffyEh
- Post #5
- Forum: Programming and Computer Science
-
S
Help with cblas_dgemm matrix multiplication
I understand what the parameters mean. I just don't see what I'm doing wrong. I have checked all of the meanings multiple times and the values I'm passing. the mass matrix is n (303) x 1 pos is n(303) x NDIM (3) tempPos is NDIM x 1 tempMass is nlocal(300) x 1 mass_avg is 1x1 pos_avg is...- SpiffyEh
- Post #3
- Forum: Programming and Computer Science
-
S
Help with cblas_dgemm matrix multiplication
I'm having problems running cblas_dgemm on a matix matrix multiplication. I have the following matricies double * mass = new double[n]; double (* pos)[NDIM] = new double[n][NDIM]; double tempPos[NDIM]; double tempMass[nlocal]; double mass_avg[1]; double pos_avg[NDIM]...- SpiffyEh
- Thread
- Matrix Matrix multiplication Multiplication
- Replies: 7
- Forum: Programming and Computer Science
-
S
How many cache misses occur when performing matrix multiplication?
Yeah... I ended up doing that. Lets say block 0,0 of A includes a00...a09 and a00..a99 (the whole 10x10 square) block 0,0 of B includes b00...b09 and b00...99 same for block c.. so basically the r,c notation represents each 10x10 block in a matrix For block 0,0 in a * block 0,0 in b...- SpiffyEh
- Post #5
- Forum: Engineering and Comp Sci Homework Help
-
S
How many cache misses occur when performing matrix multiplication?
oh! That makes so much more sense! Thank you! You assumed correctly, writes do not affect the data cache. I'm pretty sure I figured this one out but now I'm having issues with part b which involves blocking. (b). If matrices are partitioned into block matrices with each block being a 10...- SpiffyEh
- Post #3
- Forum: Engineering and Comp Sci Homework Help
-
S
How many cache misses occur when performing matrix multiplication?
Homework Statement Suppose your data cache has 30 lines and each line can hold 10 doubles. You are performing a matrix-matrix multiplication (C=C+A*B) with square matrices of size 1000 and 10 respectively. Assume data caches are only used to cache matrix elements which are doubles. The cache...- SpiffyEh
- Thread
- Replies: 4
- Forum: Engineering and Comp Sci Homework Help
-
S
Calculating speedup given rates and execution time percentage
Homework Statement a) If the new floating-point speeds up floating-point operations by, on average, 2x, the floating-point operations take 20% of the original program execution time, what is the overall speedup(ignoring the penalty to any other instruction)? b) Now assume that speeding up...- SpiffyEh
- Thread
- Time
- Replies: 1
- Forum: Engineering and Comp Sci Homework Help
-
S
Understanding the Proof of x mod pq = y mod pq for Distinct Primes p and q
Is there another way to prove this without LCM?- SpiffyEh
- Post #5
- Forum: Calculus and Beyond Homework Help
-
S
Proving X^(k*p-1)+1)mod p = x mod p
Can anyone help with this? I really need to understand how it works- SpiffyEh
- Post #2
- Forum: Calculus and Beyond Homework Help
-
S
How to do the extended euclidean algorithm
I still don't understand it. I need someone to literally walk me through it so that I understand each step. I get what the algorithm is for but I don't understand that example I posted. So the inverse is 67 in this case?- SpiffyEh
- Post #3
- Forum: Programming and Computer Science
-
S
How to do the extended euclidean algorithm
Here's the definition I have: Extended Euclidean algorithm Takes a and b Computes r, s, t such that r=gcd(a, b) and, sa + tb = r (only the last two terms in each of these sequences at any point in the algorithm) Corollary. Suppose gcd(r0, r1)=1. Then r_1-1 mod r_0=t_m mod r_0. The...- SpiffyEh
- Thread
- Algorithm Euclidean
- Replies: 3
- Forum: Programming and Computer Science
-
S
Understanding the Proof of x mod pq = y mod pq for Distinct Primes p and q
Oh ok. That makes more sense. I still don't understand how the LCM comes in but it's starting to come together some more. Thanks!- SpiffyEh
- Post #3
- Forum: Calculus and Beyond Homework Help
-
S
Proving X^(k*p-1)+1)mod p = x mod p
Homework Statement Prove that x^(k(p–1)+1) mod p = x mod p for all primes p and integer k ≥ 0. Hint: Use Fermat’s Little theorem and induction on k. Homework Equations I understand that fermat's little theorem is: Let p be prime, and b e Z_p. Then b^p = b (mod p). The Attempt at...- SpiffyEh
- Thread
- Replies: 2
- Forum: Calculus and Beyond Homework Help
-
S
Understanding the Proof of x mod pq = y mod pq for Distinct Primes p and q
Homework Statement Show that given x mod p = y mod p and x mod q = y mod q, the following is true: x mod pq = y mod pq. p and q are distinct primes. The Attempt at a Solution Here is the proof from someone that I am trying to understand: In general, x≡y (mod p) and x≡y (mod q) ⇒...- SpiffyEh
- Thread
- Proof
- Replies: 5
- Forum: Calculus and Beyond Homework Help