void Kernel(ThreadIds id) { int offset = id.X + id.Y * 1; float pow = Hlsl.Pow(xBuffer[offset], 2); // 9 xBuffer[offset] = Sigmoid(pow); // 0.9998766 }
public void Execute(ThreadIds ids) { int offset = ids.X + ids.Y * 1; float pow = Hlsl.Pow(B[offset], 2); // 9 B[offset] = Sigmoid(pow); // 0.9998766 }
public void Execute(ThreadIds ids) { var y = ids.X; for (var x = 0; x < width; x++) { var j = (x + (y * width)) * 4; var value = density[x + (y * width)] / (float)maxDensity; if (value > 1f) { value = 1f; } if (value < 0f) { value = 0f; } var v = value - 1; value = v * v * v * v * v * v * v * v * v * v * v * v * v * v * v * v * v * v * v * v * v * v * v * v; value = -value + 1; //value = -(Hlsl.Pow(-value, 2)) + 1; // THIS LINE image[j] = image[j + 1] = (int)(value * 255); image[j + 2] = 0; image[j + 3] = 255; } }
public void Execute(ThreadIds id) { var currentMax = 0; for (var j = 0; j < iterations; j++) { var i = (id.X * iterations) + j; if (i * 3 >= coordinatesSize) { return; } var pX = (int)Hlsl.Floor(((coordinates[i * 3] - left) / (right - left)) * width); var pY = (int)Hlsl.Floor(((coordinates[(i * 3) + 2] - top) / (bottom - top)) * height); if (pX < 0 || pX >= width || pY < 0 || pY >= height) { continue; } var denIndex = pX + (pY * width); density[denIndex]++; if (density[denIndex] > currentMax) { currentMax = density[denIndex]; } } Hlsl.InterlockedMax(maxDensity[0], currentMax); //if (currentMax > maxDensity[0]) { maxDensity[0] = currentMax; } }
public void Execute(ThreadIds ids) { if (B[ids.X]) { I[ids.X] = ids.X + 1; } B[ids.X] = (ids.X % 2) == 0; }
public void Execute(ThreadIds ids) { B[0] = Hlsl.Sin(A); B[1] = Hlsl.Cos(A); Hlsl.SinCos(A, out float sine, out float cosine); B[2] = sine; B[3] = cosine; }
public void Execute(ThreadIds ids) { System.Numerics.Vector2 newPosition = new System.Numerics.Vector2(); newPosition.X = positionsX[ids.X] + (directionsX[ids.X] * speeds[ids.X]); newPosition.Y = positionsY[ids.X] + (directionsY[ids.X] * speeds[ids.X]); positionsX[ids.X] = newPosition.X; positionsY[ids.X] = newPosition.Y; }
public void Execute(ThreadIds ids) { if (ids.X == 0) { B[0] = StaticPropertiesContainer.ReadonlyVector2.X; } else { B[1] = StaticPropertiesContainer.ReadonlyVector2.Y; } }
public void Execute(ThreadIds ids) { if (ids.X == 0) { B[0] = StaticFieldsContainer.StaticVector2.X; } else { B[1] = StaticFieldsContainer.StaticVector2.Y; } }
public void Execute(ThreadIds ids) { if (ids.X == 0) { B[0] = StaticFieldsContainer.StaticBuffer[0]; } else { B[1] = StaticFieldsContainer.StaticBuffer[1]; } }
/// <summary> /// Returns a hash code for this instance. /// </summary> /// <returns>A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.</returns> public override int GetHashCode() { unchecked { var hashCode = Position != null?Position.GetHashCode() : 0; hashCode = (hashCode * 397) ^ ThreadIds.GetHashCode(); hashCode = (hashCode * 397) ^ (Text != null ? Text.GetHashCode() : 0); return(hashCode); } }
public void Execute(ThreadIds ids) { if (ids.X % 2 == 0) { B[ids.X] = Value; } else { B[ids.X] = Zero; } }
/// <inheritdoc/> public void Execute(ThreadIds ids) { int x_offset = ids.X * n * p + ids.Y * m; float result = 0f; for (int k = 0; k < m; k++) { result += x[x_offset + k] * w[k * p + ids.Z]; } y[ids.X * n * p + ids.Y * p + ids.Z] = result + b[ids.Z]; }
/// <summary> /// Equalses the specified other. /// </summary> /// <param name="other">The other.</param> /// <returns><c>true</c> if XXXX, <c>false</c> otherwise.</returns> public bool Equals(AddTagRequest other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return(Equals(Position, other.Position) && ThreadIds.SequenceEqual(other.ThreadIds) && string.Equals(Text, other.Text)); }
public void Execute(ThreadIds ids) { if (ids.X == 0) { B[0] = V4.X; } else if (ids.X == 1) { B[1] = V4.Y; } else if (ids.X == 2) { B[2] = V4.Z; } else if (ids.X == 3) { B[3] = V4.W; } }
private void OnToolTipOpening(object sender, ToolTipEventArgs e) { if (Process.IsRunning) { return; } StackPanel panel = new StackPanel(); ParallelStackFrameModel selectedItem = datagrid.SelectedItem as ParallelStackFrameModel; if (selectedItem == null) { panel.Children.Add(new TextBlock { Text = "No item selected" }); this.toolTip.Content = panel; return; } foreach (var thread in Process.Threads) { if (ThreadIds.Contains(thread.ID)) { foreach (var frame in thread.Callstack) { if (selectedItem.MethodName == frame.GetMethodName()) { TextBlock tb = new TextBlock(); tb.Text = thread.ID + ": " + CallStackPadContent.GetFullName(frame); panel.Children.Add(tb); } } } } this.toolTip.Content = panel; }
public void Execute(ThreadIds ids) { B[0] = 1; }
public void Execute(ThreadIds ids) { }
public void Execute(ThreadIds ids) { OUT[ids.X] = IN[ids.X]; }
public void Execute(ThreadIds ids) { B[0] = StaticMethodsContainer.SquareWithAttributes(4); }
public void Execute(ThreadIds ids) { B[0] = F(3); }
public void Execute(ThreadIds ids) { B[0] = StaticPropertiesContainer.SquareFunc(3); }
/// <inheritdoc/> public void Execute(ThreadIds ids) { int offset = ids.X + ids.Y * width; buffer[offset] *= 2; }
public void Execute(ThreadIds ids) { B[0] = SquareFunc(3); }
public void Execute(ThreadIds ids) { B[0] = StaticMethodsContainer.Square(4); }
public void Execute(ThreadIds ids) { B[ids.X] = C[ids.X]; }
public void Execute(ThreadIds ids) { B[0] = F2.YX; }
public void Execute(ThreadIds ids) { B[1] = F2.XY; }
public void Execute(ThreadIds ids) { B[0] = StaticFieldsContainer.StaticFloat + StaticFieldsContainer.StaticFloat; }
public void Execute(ThreadIds ids) { B[0] = Bool3.TrueX; B[1] = Bool3.True; B[2].YZ = Bool2.True; }