<commit_before>package BIDMat

import edu.berkeley.bid.VML._
import edu.berkeley.bid.VSL
import edu.berkeley.bid.VSL._
import edu.berkeley.bid.CBLAS._
import jcuda._;
import jcuda.jcublas.JCublas;
import jcuda.runtime.JCuda;
import jcuda.jcurand.JCurand._;
import jcuda.jcurand.curandGenerator;
import jcuda.jcurand.curandRngType._;
import edu.berkeley.bid.CUMAT;
import java.util.Random._;
import MatFunctions._

object SciFunctions {
  final val SEED:Int = 1452462553 
  // Java initialization
  final val myrand = new java.util.Random(SEED)
  // VSL random number generator initialization
  final val BRNG:Int = BRNG_MCG31
  final val METHOD:Int = 0
  final val stream = new VSL();
  final val errcode = vslNewStream(stream, BRNG, SEED)
  // VML mode control, controlled with setVMLmode()
  final val VMLdefault = VMLMODE.VML_ERRMODE_DEFAULT | VMLMODE.VML_HA   // Default
  final val VMLfast =    VMLMODE.VML_ERRMODE_DEFAULT | VMLMODE.VML_LA   // Faster, Low accuracy, default error handling
  final val VMLturbo =   VMLMODE.VML_ERRMODE_DEFAULT | VMLMODE.VML_EP   // Fastest, Lower accuracy, default error handling
  // Curand initialization
  var cudarng:curandGenerator = null
  if (Mat.hasCUDA > 0) {
  	jcuda.runtime.JCuda.initialize
    cudarng = new curandGenerator
    curandCreateGenerator(cudarng, CURAND_RNG_PSEUDO_DEFAULT) 
    curandSetPseudoRandomGeneratorSeed(cudarng, SEED)
  }
  
  def resetCUDA = JCuda.cudaDeviceReset
  
  def device(i:Int) = JCuda.cudaSetDevice(i)
  
  def device:Int = {
    val ar = Array[Int](1)
    JCuda.cudaGetDevice(ar)
    ar(0)
  }
  
  def connect(i:Int) = {
  	val v0 = JCuda.cudaDeviceEnablePeerAccess(i,0)
    val j = device
    device(i)<commit_msg>removing automatic MKL dependencies<commit_after>package BIDMat

import edu.berkeley.bid.VML._
import edu.berkeley.bid.VSL
import edu.berkeley.bid.VSL._
import edu.berkeley.bid.CBLAS._
import jcuda._;
import jcuda.jcublas.JCublas;
import jcuda.runtime.JCuda;
import jcuda.jcurand.JCurand._;
import jcuda.jcurand.curandGenerator;
import jcuda.jcurand.curandRngType._;
import edu.berkeley.bid.CUMAT;
import java.util.Random._;
import MatFunctions._

object SciFunctions {
  final val SEED:Int = 1452462553 
  // Java initialization
  final val myrand = new java.util.Random(SEED)
  // VSL random number generator initialization
  final val BRNG:Int = BRNG_MCG31
  final val METHOD:Int = 0
  final val stream = if (Mat.noMKL) null else new VSL();
  final val errcode = if (Mat.noMKL) null else vslNewStream(stream, BRNG, SEED)
  // VML mode control, controlled with setVMLmode()
  final val VMLdefault = VMLMODE.VML_ERRMODE_DEFAULT | VMLMODE.VML_HA   // Default
  final val VMLfast =    VMLMODE.VML_ERRMODE_DEFAULT | VMLMODE.VML_LA   // Faster, Low accuracy, default error handling
  final val VMLturbo =   VMLMODE.VML_ERRMODE_DEFAULT | VMLMODE.VML_EP   // Fastest, Lower accuracy, default error handling
  // Curand initialization
  var cudarng:curandGenerator = null
  if (Mat.hasCUDA > 0) {
  	jcuda.runtime.JCuda.initialize
    cudarng = new curandGenerator
    curandCreateGenerator(cudarng, CURAND_RNG_PSEUDO_DEFAULT) 
    curandSetPseudoRandomGeneratorSeed(cudarng, SEED)
  }
  
  def resetCUDA = JCuda.cudaDeviceReset
  
  def device(i:Int) = JCuda.cudaSetDevice(i)
  
  def device:Int = {
    val ar = Array[Int](1)
    JCuda.cudaGetDevice(ar)
    ar(0)
  }
  
  def connect(i:Int) = {
  	val v0 = JCuda.cudaDeviceEnablePeerAccess(i,0)
    val j = device
    device(i)
{'fraction_non_alphanumeric': 0.0903337169159954, 'fraction_numerical': 0.010356731875719217, 'mean_word_length': 3.967142857142857, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7236417', 'n_tokens_mistral': 1341, 'n_tokens_neox': 1292, 'n_words': 284}