lambdaworks-math 0.10.0

Modular math library for cryptography
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#pragma once
#include "util.h.metal"

template<typename Fp>
[[kernel]] void bitrev_permutation(
    device Fp* input [[ buffer(0) ]],
    device Fp* result [[ buffer(1) ]],
    uint index [[ thread_position_in_grid ]],
    uint size [[ threads_per_grid ]]
)
{
    result[index] = input[reverse_index(index, size)];
}