mirror of
https://github.com/nasrlol/torque.git
synced 2025-11-27 23:09:21 +01:00
Merge pull request #2 from nasrlol/feature/single-threaded-cpu-load-generation
Feature/single threaded cpu load generation boilerplate
This commit is contained in:
commit
6114a98d54
10
.gitignore
vendored
10
.gitignore
vendored
@ -1,21 +1,13 @@
|
|||||||
# Scala + sbt build artifacts
|
|
||||||
target/
|
target/
|
||||||
project/target/
|
project/target/
|
||||||
project/project/
|
project/project/
|
||||||
|
.bloop/
|
||||||
# Metals + BSP cache
|
|
||||||
.metals/
|
.metals/
|
||||||
.bsp/
|
.bsp/
|
||||||
|
|
||||||
# Java / JVM artifacts
|
|
||||||
*.class
|
*.class
|
||||||
*.log
|
*.log
|
||||||
hs_err_pid*
|
hs_err_pid*
|
||||||
|
|
||||||
# IntelliJ
|
|
||||||
.idea/
|
.idea/
|
||||||
*.iml
|
*.iml
|
||||||
|
|
||||||
# VSCode
|
|
||||||
.vscode/
|
.vscode/
|
||||||
|
|
||||||
|
|||||||
@ -3,3 +3,4 @@ version := "1.0"
|
|||||||
name := "torque"
|
name := "torque"
|
||||||
organization := "com.nsrddyn"
|
organization := "com.nsrddyn"
|
||||||
|
|
||||||
|
libraryDependencies += "dev.zio" %% "zio" % "2.1.22"
|
||||||
|
|||||||
10
src/main/scala/com/nsrddyn/Main.scala
Normal file
10
src/main/scala/com/nsrddyn/Main.scala
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
package com.nsrddyn
|
||||||
|
|
||||||
|
|
||||||
|
object Torque {
|
||||||
|
|
||||||
|
def main(args: Array[String]): Unit = {
|
||||||
|
println("--- TORQUE STRESS TESTING UTILITY ---")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
6
src/main/scala/com/nsrddyn/cpu/ALU/ALU.scala
Normal file
6
src/main/scala/com/nsrddyn/cpu/ALU/ALU.scala
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
package com.nsrddyn
|
||||||
|
|
||||||
|
class ALU {
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
13
src/main/scala/com/nsrddyn/cpu/ALU/Hash.scala
Normal file
13
src/main/scala/com/nsrddyn/cpu/ALU/Hash.scala
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
package com.nsrddyn
|
||||||
|
|
||||||
|
import scala.util.hashing
|
||||||
|
|
||||||
|
class Hash {
|
||||||
|
|
||||||
|
def hashString(): Unit = {
|
||||||
|
|
||||||
|
println("Hello from hash function")
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
5
src/main/scala/com/nsrddyn/cpu/ALU/Prime.scala
Normal file
5
src/main/scala/com/nsrddyn/cpu/ALU/Prime.scala
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
package com.nsrddyn
|
||||||
|
|
||||||
|
class Prime {
|
||||||
|
|
||||||
|
}
|
||||||
12
src/main/scala/com/nsrddyn/cpu/Cpu.scala
Normal file
12
src/main/scala/com/nsrddyn/cpu/Cpu.scala
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
package com.nsrddyn
|
||||||
|
|
||||||
|
/*
|
||||||
|
* cpu object, only one instance of an object needed
|
||||||
|
*/
|
||||||
|
|
||||||
|
object Cpu {
|
||||||
|
|
||||||
|
val name = ""
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,28 @@
|
|||||||
|
package com.nsrddyn
|
||||||
|
|
||||||
|
|
||||||
|
class CholeskyDecomposition {
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Floating point operation to stress the cpu
|
||||||
|
* Calculate the number of KFLOPS / FLOPS
|
||||||
|
* implementation of the Cholesky decomposition
|
||||||
|
* More information on the Cholesky decomposition at:
|
||||||
|
* https://en.wikipedia.org/wiki/Cholesky_decomposition
|
||||||
|
*
|
||||||
|
* Linpack uses the cholesky decomposition
|
||||||
|
* https://www.netlib.org/linpack/
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
def choleskyDecomposition(n: Int): Unit = {
|
||||||
|
|
||||||
|
for (w <- 0 to n) {
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
6
src/main/scala/com/nsrddyn/cpu/FPU/FPU.scala
Normal file
6
src/main/scala/com/nsrddyn/cpu/FPU/FPU.scala
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
package com.nsrddyn
|
||||||
|
|
||||||
|
|
||||||
|
class FPU {
|
||||||
|
|
||||||
|
}
|
||||||
5
src/main/scala/com/nsrddyn/cpu/FPU/Matrix.scala
Normal file
5
src/main/scala/com/nsrddyn/cpu/FPU/Matrix.scala
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
package com.nsrddyn
|
||||||
|
|
||||||
|
class Matrix {
|
||||||
|
|
||||||
|
}
|
||||||
@ -1,5 +0,0 @@
|
|||||||
package com.nsrddyn
|
|
||||||
|
|
||||||
def main(args: Array[String]) : Unit = {
|
|
||||||
println("Hello World!")
|
|
||||||
}
|
|
||||||
Loading…
Reference in New Issue
Block a user