Skip to content

Commit

Permalink
Improved documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
peytondmurray committed Jul 9, 2020
1 parent 2d7bf8a commit 53a0217
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 10 deletions.
10 changes: 5 additions & 5 deletions cuda/madd.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func Madd2(dst, src1, src2 *data.Slice, factor1, factor2 float32) {
}
}

// multiply-add: dst[i] = src1[i] * factor1 + src2[i] * factor2 + src3 * factor3
// multiply-add: dst[i] = src1[i] * factor1 + src2[i] * factor2 + src3[i] * factor3
func Madd3(dst, src1, src2, src3 *data.Slice, factor1, factor2, factor3 float32) {
N := dst.Len()
nComp := dst.NComp()
Expand All @@ -60,7 +60,7 @@ func Madd3(dst, src1, src2, src3 *data.Slice, factor1, factor2, factor3 float32)
}
}

// multiply-add: dst[i] = src1[i] * factor1 + src2[i] * factor2 + src3 * factor3
// multiply-add: dst[i] = src1[i] * factor1 + src2[i] * factor2 + src3[i] * factor3 + src4[i] * factor4
func Madd4(dst, src1, src2, src3, src4 *data.Slice, factor1, factor2, factor3, factor4 float32) {
N := dst.Len()
nComp := dst.NComp()
Expand All @@ -76,7 +76,7 @@ func Madd4(dst, src1, src2, src3, src4 *data.Slice, factor1, factor2, factor3, f
}
}

// multiply-add: dst[i] = src1[i] * factor1 + src2[i] * factor2 + src3 * factor3
// multiply-add: dst[i] = src1[i] * factor1 + src2[i] * factor2 + src3[i] * factor3 + src4[i] * factor4 + src5[i] * factor5
func Madd5(dst, src1, src2, src3, src4, src5 *data.Slice, factor1, factor2, factor3, factor4, factor5 float32) {
N := dst.Len()
nComp := dst.NComp()
Expand All @@ -93,7 +93,7 @@ func Madd5(dst, src1, src2, src3, src4, src5 *data.Slice, factor1, factor2, fact
}
}

// multiply-add: dst[i] = src1[i] * factor1 + src2[i] * factor2 + src3 * factor3
// multiply-add: dst[i] = src1[i] * factor1 + src2[i] * factor2 + src3[i] * factor3 + src4[i] * factor4 + src5[i] * factor5 + src6[i] * factor6
func Madd6(dst, src1, src2, src3, src4, src5, src6 *data.Slice, factor1, factor2, factor3, factor4, factor5, factor6 float32) {
N := dst.Len()
nComp := dst.NComp()
Expand All @@ -111,7 +111,7 @@ func Madd6(dst, src1, src2, src3, src4, src5, src6 *data.Slice, factor1, factor2
}
}

// multiply-add: dst[i] = src1[i] * factor1 + src2[i] * factor2 + src3 * factor3
// multiply-add: dst[i] = src1[i] * factor1 + src2[i] * factor2 + src3[i] * factor3 + src4[i] * factor4 + src5[i] * factor5 + src6[i] * factor6 + src7[i] * factor7
func Madd7(dst, src1, src2, src3, src4, src5, src6, src7 *data.Slice, factor1, factor2, factor3, factor4, factor5, factor6, factor7 float32) {
N := dst.Len()
nComp := dst.NComp()
Expand Down
2 changes: 1 addition & 1 deletion cuda/madd4.cu
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

// dst[i] = fac1 * src1[i] + fac2 * src2[i] + fac3 * src3[i]
// dst[i] = src1[i] * fac1 + src2[i] * fac2 + src3[i] * fac3 + src4[i] * fac4
extern "C" __global__ void
madd4(float* __restrict__ dst,
float* __restrict__ src1, float fac1,
Expand Down
2 changes: 1 addition & 1 deletion cuda/madd5.cu
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

// dst[i] = fac1 * src1[i] + fac2 * src2[i] + fac3 * src3[i]
// dst[i] = src1[i] * fac1 + src2[i] * fac2 + src3[i] * fac3 + src4[i] * fac4 + src5[i] * fac5
extern "C" __global__ void
madd5(float* __restrict__ dst,
float* __restrict__ src1, float fac1,
Expand Down
2 changes: 1 addition & 1 deletion cuda/madd6.cu
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

// dst[i] = fac1 * src1[i] + fac2 * src2[i] + fac3 * src3[i]
// dst[i] = src1[i] * fac1 + src2[i] * fac2 + src3[i] * fac3 + src4[i] * fac4 + src5[i] * fac5 + src6[i] * fac6
extern "C" __global__ void
madd6(float* __restrict__ dst,
float* __restrict__ src1, float fac1,
Expand Down
2 changes: 1 addition & 1 deletion cuda/madd7.cu
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

// dst[i] = fac1 * src1[i] + fac2 * src2[i] + fac3 * src3[i]
// dst[i] = src1[i] * fac1 + src2[i] * fac2 + src3[i] * fac3 + src4[i] * fac4 + src5[i] * fac5 + src6[i] * fac6 + src7[i] * fac7
extern "C" __global__ void
madd7(float* __restrict__ dst,
float* __restrict__ src1, float fac1,
Expand Down
1 change: 0 additions & 1 deletion test/sp4_madd_bench.mx3
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,3 @@ run(10e-9)
t7 := now()

print(sprintf("Run time: RK23BS %6.6E, RK4 %6.6E, RK45DP %6.6E, RK56 %6.6E", t1.sub(t0).Seconds(), t3.sub(t2).Seconds(), t5.sub(t4).Seconds(), t7.sub(t6).Seconds()))

0 comments on commit 53a0217

Please sign in to comment.