MCPcopy Index your code
hub / github.com/BrainJS/brain.js / CPUKernel

Function CPUKernel

browser.js:9142–9165  ·  view source on GitHub ↗

* @constructor CPUKernel * * @desc Kernel Implementation for CPU. * * Instantiates properties to the CPU Kernel. * * @extends KernelBase * * @prop {Object} thread - The thread dimensions, x, y and z * @prop {Object} output - The canvas dimensions * @prop {Object} function

(fnString, settings)

Source from the content-addressed store, hash-verified

9140 *
9141 */
9142 function CPUKernel(fnString, settings) {
9143 _classCallCheck(this, CPUKernel);
9144
9145 var _this = _possibleConstructorReturn(this, (CPUKernel.__proto__ || Object.getPrototypeOf(CPUKernel)).call(this, fnString, settings));
9146
9147 _this._fn = null;
9148 _this.run = null;
9149 _this._canvasCtx = null;
9150 _this._imageData = null;
9151 _this._colorData = null;
9152 _this._kernelString = null;
9153 _this.thread = {
9154 x: 0,
9155 y: 0,
9156 z: 0
9157 };
9158
9159 _this.run = function () {
9160 this.run = null;
9161 this.build.apply(this, arguments);
9162 return this.run.apply(this, arguments);
9163 }.bind(_this);
9164 return _this;
9165 }
9166
9167 /**
9168 * @memberOf CPUKernel#

Callers

nothing calls this directly

Calls 2

_classCallCheckFunction · 0.70

Tested by

no test coverage detected