Skip to content

Commit

Permalink
Merge pull request #35 from zkmopro/fix/redefinition_in_metal_shader
Browse files Browse the repository at this point in the history
fix: add `#pragma once` as the header guard to prevent redefinition error
  • Loading branch information
FoodChain1028 authored Jan 9, 2025
2 parents 1556695 + a67a196 commit 6625f13
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions mopro-msm/src/msm/metal_msm/shader/bigint/bigint.metal
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// source: https://github.com/geometryxyz/msl-secp256k1
#pragma once

using namespace metal;
#include "../misc/get_constant.metal"
Expand Down
1 change: 1 addition & 0 deletions mopro-msm/src/msm/metal_msm/shader/curve/jacobian.metal
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// source: https://github.com/geometryxyz/msl-secp256k1
// algorithms: https://hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-0.html
#pragma once

using namespace metal;
#include <metal_stdlib>
Expand Down
1 change: 1 addition & 0 deletions mopro-msm/src/msm/metal_msm/shader/field/ff.metal
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// source: https://github.com/geometryxyz/msl-secp256k1
#pragma once

using namespace metal;
#include <metal_stdlib>
Expand Down
2 changes: 2 additions & 0 deletions mopro-msm/src/msm/metal_msm/shader/misc/get_constant.metal
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#pragma once

using namespace metal;
#include <metal_stdlib>
#include "../constants.metal"
Expand Down
2 changes: 2 additions & 0 deletions mopro-msm/src/msm/metal_msm/shader/misc/types.metal
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#pragma once

using namespace metal;
#include <metal_stdlib>

Expand Down
1 change: 1 addition & 0 deletions mopro-msm/src/msm/metal_msm/shader/mont_backend/mont.metal
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// adapted from: https://github.com/geometryxyz/msl-secp256k1
#pragma once

using namespace metal;
#include <metal_stdlib>
Expand Down

0 comments on commit 6625f13

Please sign in to comment.