C# System.Numerics.Vector Clamp
Have you tried something like this:

Create the following vector:

  System.Numerics.Vector&lt;float&gt; maxima = new System.Numerics.Vector&lt;float&gt;(maximimum);


Then after the multiplication call:

arrayvector = System.Numerics.Vector.Min(arrayvector, maxima);


Here you may have to create an new vector instead of reassigning to arrayvector?



So all in all it ends up like:

  int length = array.Length;

  int floatcount = System.Numerics.Vector&lt;float&gt;.Count;
  System.Numerics.Vector&lt;float&gt; maxima = new System.Numerics.Vector&lt;float&gt;(maximimum);

  for (int i = 0; i &lt; length; i += floatcount)
  {
    System.Numerics.Vector&lt;float&gt; arrayvector = new System.Numerics.Vector&lt;float&gt;(array, i);

    arrayvector = System.Numerics.Vector.Multiply(arrayvector, 2.0f);
    arrayvector = System.Numerics.Vector.Min(arrayvector, maxima);
    // There may be different or multiple vector operations in here.

    arrayvector.CopyTo(array, i);

  }


Disclaimer: I haven't tested the above, so don't hang me if it's not an improvement :-)