lib/opentuner/streamjit/sjparameters.py
def add_core(self, config):
		"""Take a fraction of each non-zero core and move it to a zero core."""
		self.normalize(config)
		nonzeroes = self.nonzeroes(config)
		fraction = 1.0/(len(nonzeroes) + 1)
		random.choice(self.zeroes(config)).set_value(config, fraction)
		for p in nonzeroes:
			p.set_value(config, p.get_value(config) * (1.0 - fraction))
Take a fraction of each non-zero core and move it to a zero core.
Take a fraction of each non-zero core and move it to a zero core.
Take a fraction of each non - zero core and move it to a zero core .
def add_core(self, config):
		self.normalize(config)
		nonzeroes = self.nonzeroes(config)
		fraction = 1.0/(len(nonzeroes) + 1)
		random.choice(self.zeroes(config)).set_value(config, fraction)
		for p in nonzeroes:
			p.set_value(config, p.get_value(config) * (1.0 - fraction))
def add_core ( self , config ) : self . normalize ( config ) nonzeroes = self . nonzeroes ( config ) fraction = 1.0 / ( len ( nonzeroes ) + 1 ) random . choice ( self . zeroes ( config ) ) . set_value ( config , fraction ) for p in nonzeroes : p . set_value ( config , p . get_value ( config ) * ( 1.0 - fraction ) )
Take a fraction of each non-zero core and move it to a zero core.
Take a fraction of each non - zero core and move it to a zero core .
"""Take a fraction of each non-zero core and move it to a zero core."""
self
config