Код: Выделить всё
float[] output = new float[100000];
BitArray bitArray = new BitArray(output.Length);
Parallel.For(0, output.Length, i =>
{
bitArray[i] = output[i] > 0.5f;
});
Код: Выделить всё
float[] output = new float[100000];
BitArray bitArray = new BitArray(output.Length);
for (int i = 0; i < output.Length; i++)
{
bitArray[i] = output[i] > 0.5f;
}
Подробнее здесь: https://stackoverflow.com/questions/791 ... o-bitarray
Мобильная версия