-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update evaluation output (*.mlir & *.cpp)
- Loading branch information
1 parent
ba027a5
commit 349154c
Showing
49 changed files
with
347 additions
and
178 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
## Misc | ||
.DS_Store | ||
.idea | ||
.cache | ||
|
||
## Documentation | ||
docs/* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,28 @@ | ||
#include "emitc_helper.h" | ||
seal::Ciphertext encryptedHammingDistance_1024(seal::Ciphertext v1, seal::Ciphertext v2) { | ||
seal::Ciphertext v3 = evaluator_sub(v1, v2); | ||
seal::Ciphertext v4 = evaluator_multiply(v3, v3); | ||
seal::Ciphertext v5 = evaluator_rotate(v4, 512); | ||
seal::Ciphertext v6 = evaluator_add(v4, v5); | ||
seal::Ciphertext v7 = evaluator_rotate(v6, 256); | ||
seal::Ciphertext v8 = evaluator_add(v6, v7); | ||
seal::Ciphertext v9 = evaluator_rotate(v8, 128); | ||
seal::Ciphertext v10 = evaluator_add(v8, v9); | ||
seal::Ciphertext v11 = evaluator_rotate(v10, 64); | ||
seal::Ciphertext v12 = evaluator_add(v10, v11); | ||
seal::Ciphertext v13 = evaluator_rotate(v12, 32); | ||
seal::Ciphertext v14 = evaluator_add(v12, v13); | ||
seal::Ciphertext v15 = evaluator_rotate(v14, 16); | ||
seal::Ciphertext v16 = evaluator_add(v14, v15); | ||
seal::Ciphertext v17 = evaluator_rotate(v16, 8); | ||
seal::Ciphertext v18 = evaluator_add(v16, v17); | ||
seal::Ciphertext v19 = evaluator_rotate(v18, 4); | ||
seal::Ciphertext v20 = evaluator_add(v18, v19); | ||
seal::Ciphertext v21 = evaluator_rotate(v20, 2); | ||
seal::Ciphertext v22 = evaluator_add(v20, v21); | ||
seal::Ciphertext v23 = evaluator_rotate(v22, 1); | ||
seal::Ciphertext v24 = evaluator_add(v22, v23); | ||
seal::Ciphertext v25 = evaluator_rotate(v24, 1022); | ||
return v25; | ||
} | ||
|
||
|
||
// Placeholder for compiled function, so that C++ compilation always goes through | ||
seal::Ciphertext encryptedHammingDistance_1024(seal::Ciphertext x, seal::Ciphertext y) | ||
{ | ||
assert(false && "Please compile the HECO inputs to replace this placeholder output."); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,16 @@ | ||
#include "emitc_helper.h" | ||
seal::Ciphertext encryptedHammingDistance_16(seal::Ciphertext v1, seal::Ciphertext v2) { | ||
seal::Ciphertext v3 = evaluator_sub(v1, v2); | ||
seal::Ciphertext v4 = evaluator_multiply(v3, v3); | ||
seal::Ciphertext v5 = evaluator_rotate(v4, 8); | ||
seal::Ciphertext v6 = evaluator_add(v4, v5); | ||
seal::Ciphertext v7 = evaluator_rotate(v6, 4); | ||
seal::Ciphertext v8 = evaluator_add(v6, v7); | ||
seal::Ciphertext v9 = evaluator_rotate(v8, 2); | ||
seal::Ciphertext v10 = evaluator_add(v8, v9); | ||
seal::Ciphertext v11 = evaluator_rotate(v10, 1); | ||
seal::Ciphertext v12 = evaluator_add(v10, v11); | ||
seal::Ciphertext v13 = evaluator_rotate(v12, 14); | ||
return v13; | ||
} | ||
|
||
|
||
// Placeholder for compiled function, so that C++ compilation always goes through | ||
seal::Ciphertext encryptedHammingDistance_16(seal::Ciphertext x, seal::Ciphertext y) | ||
{ | ||
assert(false && "Please compile the HECO inputs to replace this placeholder output."); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,24 @@ | ||
#include "emitc_helper.h" | ||
seal::Ciphertext encryptedHammingDistance_256(seal::Ciphertext v1, seal::Ciphertext v2) { | ||
seal::Ciphertext v3 = evaluator_sub(v1, v2); | ||
seal::Ciphertext v4 = evaluator_multiply(v3, v3); | ||
seal::Ciphertext v5 = evaluator_rotate(v4, 128); | ||
seal::Ciphertext v6 = evaluator_add(v4, v5); | ||
seal::Ciphertext v7 = evaluator_rotate(v6, 64); | ||
seal::Ciphertext v8 = evaluator_add(v6, v7); | ||
seal::Ciphertext v9 = evaluator_rotate(v8, 32); | ||
seal::Ciphertext v10 = evaluator_add(v8, v9); | ||
seal::Ciphertext v11 = evaluator_rotate(v10, 16); | ||
seal::Ciphertext v12 = evaluator_add(v10, v11); | ||
seal::Ciphertext v13 = evaluator_rotate(v12, 8); | ||
seal::Ciphertext v14 = evaluator_add(v12, v13); | ||
seal::Ciphertext v15 = evaluator_rotate(v14, 4); | ||
seal::Ciphertext v16 = evaluator_add(v14, v15); | ||
seal::Ciphertext v17 = evaluator_rotate(v16, 2); | ||
seal::Ciphertext v18 = evaluator_add(v16, v17); | ||
seal::Ciphertext v19 = evaluator_rotate(v18, 1); | ||
seal::Ciphertext v20 = evaluator_add(v18, v19); | ||
seal::Ciphertext v21 = evaluator_rotate(v20, 254); | ||
return v21; | ||
} | ||
|
||
|
||
// Placeholder for compiled function, so that C++ compilation always goes through | ||
seal::Ciphertext encryptedHammingDistance_256(seal::Ciphertext x, seal::Ciphertext y) | ||
{ | ||
assert(false && "Please compile the HECO inputs to replace this placeholder output."); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,12 @@ | ||
#include "emitc_helper.h" | ||
seal::Ciphertext encryptedHammingDistance_4(seal::Ciphertext v1, seal::Ciphertext v2) { | ||
seal::Ciphertext v3 = evaluator_sub(v1, v2); | ||
seal::Ciphertext v4 = evaluator_multiply(v3, v3); | ||
seal::Ciphertext v5 = evaluator_rotate(v4, 2); | ||
seal::Ciphertext v6 = evaluator_add(v4, v5); | ||
seal::Ciphertext v7 = evaluator_rotate(v6, 1); | ||
seal::Ciphertext v8 = evaluator_add(v6, v7); | ||
seal::Ciphertext v9 = evaluator_rotate(v8, 2); | ||
return v9; | ||
} | ||
|
||
|
||
// Placeholder for compiled function, so that C++ compilation always goes through | ||
seal::Ciphertext encryptedHammingDistance_4(seal::Ciphertext x, seal::Ciphertext y) | ||
{ | ||
assert(false && "Please compile the HECO inputs to replace this placeholder output."); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,32 @@ | ||
#include "emitc_helper.h" | ||
seal::Ciphertext encryptedHammingDistance_4096(seal::Ciphertext v1, seal::Ciphertext v2) { | ||
seal::Ciphertext v3 = evaluator_sub(v1, v2); | ||
seal::Ciphertext v4 = evaluator_multiply(v3, v3); | ||
seal::Ciphertext v5 = evaluator_rotate(v4, 2048); | ||
seal::Ciphertext v6 = evaluator_add(v4, v5); | ||
seal::Ciphertext v7 = evaluator_rotate(v6, 1024); | ||
seal::Ciphertext v8 = evaluator_add(v6, v7); | ||
seal::Ciphertext v9 = evaluator_rotate(v8, 512); | ||
seal::Ciphertext v10 = evaluator_add(v8, v9); | ||
seal::Ciphertext v11 = evaluator_rotate(v10, 256); | ||
seal::Ciphertext v12 = evaluator_add(v10, v11); | ||
seal::Ciphertext v13 = evaluator_rotate(v12, 128); | ||
seal::Ciphertext v14 = evaluator_add(v12, v13); | ||
seal::Ciphertext v15 = evaluator_rotate(v14, 64); | ||
seal::Ciphertext v16 = evaluator_add(v14, v15); | ||
seal::Ciphertext v17 = evaluator_rotate(v16, 32); | ||
seal::Ciphertext v18 = evaluator_add(v16, v17); | ||
seal::Ciphertext v19 = evaluator_rotate(v18, 16); | ||
seal::Ciphertext v20 = evaluator_add(v18, v19); | ||
seal::Ciphertext v21 = evaluator_rotate(v20, 8); | ||
seal::Ciphertext v22 = evaluator_add(v20, v21); | ||
seal::Ciphertext v23 = evaluator_rotate(v22, 4); | ||
seal::Ciphertext v24 = evaluator_add(v22, v23); | ||
seal::Ciphertext v25 = evaluator_rotate(v24, 2); | ||
seal::Ciphertext v26 = evaluator_add(v24, v25); | ||
seal::Ciphertext v27 = evaluator_rotate(v26, 1); | ||
seal::Ciphertext v28 = evaluator_add(v26, v27); | ||
seal::Ciphertext v29 = evaluator_rotate(v28, 4094); | ||
return v29; | ||
} | ||
|
||
|
||
// Placeholder for compiled function, so that C++ compilation always goes through | ||
seal::Ciphertext encryptedHammingDistance_4096(seal::Ciphertext x, seal::Ciphertext y) | ||
{ | ||
assert(false && "Please compile the HECO inputs to replace this placeholder output."); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,20 @@ | ||
#include "emitc_helper.h" | ||
seal::Ciphertext encryptedHammingDistance_64(seal::Ciphertext v1, seal::Ciphertext v2) { | ||
seal::Ciphertext v3 = evaluator_sub(v1, v2); | ||
seal::Ciphertext v4 = evaluator_multiply(v3, v3); | ||
seal::Ciphertext v5 = evaluator_rotate(v4, 32); | ||
seal::Ciphertext v6 = evaluator_add(v4, v5); | ||
seal::Ciphertext v7 = evaluator_rotate(v6, 16); | ||
seal::Ciphertext v8 = evaluator_add(v6, v7); | ||
seal::Ciphertext v9 = evaluator_rotate(v8, 8); | ||
seal::Ciphertext v10 = evaluator_add(v8, v9); | ||
seal::Ciphertext v11 = evaluator_rotate(v10, 4); | ||
seal::Ciphertext v12 = evaluator_add(v10, v11); | ||
seal::Ciphertext v13 = evaluator_rotate(v12, 2); | ||
seal::Ciphertext v14 = evaluator_add(v12, v13); | ||
seal::Ciphertext v15 = evaluator_rotate(v14, 1); | ||
seal::Ciphertext v16 = evaluator_add(v14, v15); | ||
seal::Ciphertext v17 = evaluator_rotate(v16, 62); | ||
return v17; | ||
} | ||
|
||
|
||
// Placeholder for compiled function, so that C++ compilation always goes through | ||
seal::Ciphertext encryptedHammingDistance_64(seal::Ciphertext x, seal::Ciphertext y) | ||
{ | ||
assert(false && "Please compile the HECO inputs to replace this placeholder output."); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,14 @@ | ||
#include "emitc_helper.h" | ||
seal::Ciphertext encryptedRobertsCross_16x16(seal::Ciphertext v1) { | ||
seal::Ciphertext v2 = evaluator_rotate(v1, 239); | ||
seal::Ciphertext v3 = evaluator_sub(v1, v2); | ||
seal::Ciphertext v4 = evaluator_rotate(v1, 241); | ||
seal::Ciphertext v5 = evaluator_sub(v1, v4); | ||
seal::Ciphertext v6 = evaluator_multiply(v3, v3); | ||
seal::Ciphertext v7 = evaluator_multiply(v5, v5); | ||
seal::Ciphertext v8 = evaluator_rotate(v6, 17); | ||
seal::Ciphertext v9 = evaluator_rotate(v7, 16); | ||
seal::Ciphertext v10 = evaluator_add(v8, v9); | ||
return v10; | ||
} | ||
|
||
|
||
// Placeholder for compiled function, so that C++ compilation always goes through | ||
seal::Ciphertext encryptedRobertsCross_16x16(seal::Ciphertext img) | ||
{ | ||
assert(false && "Please compile the HECO inputs to replace this placeholder output."); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,14 @@ | ||
#include "emitc_helper.h" | ||
seal::Ciphertext encryptedRobertsCross_2x2(seal::Ciphertext v1) { | ||
seal::Ciphertext v2 = evaluator_rotate(v1, 1); | ||
seal::Ciphertext v3 = evaluator_sub(v1, v2); | ||
seal::Ciphertext v4 = evaluator_rotate(v1, 3); | ||
seal::Ciphertext v5 = evaluator_sub(v1, v4); | ||
seal::Ciphertext v6 = evaluator_multiply(v3, v3); | ||
seal::Ciphertext v7 = evaluator_multiply(v5, v5); | ||
seal::Ciphertext v8 = evaluator_rotate(v6, 3); | ||
seal::Ciphertext v9 = evaluator_rotate(v7, 2); | ||
seal::Ciphertext v10 = evaluator_add(v8, v9); | ||
return v10; | ||
} | ||
|
||
|
||
// Placeholder for compiled function, so that C++ compilation always goes through | ||
seal::Ciphertext encryptedRobertsCross_2x2(seal::Ciphertext img) | ||
{ | ||
assert(false && "Please compile the HECO inputs to replace this placeholder output."); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.