Skip to content

Commit

Permalink
Added clang-format-all.sh, do not use clang-format for CSharp.
Browse files Browse the repository at this point in the history
  • Loading branch information
Wei Dai committed Feb 11, 2020
1 parent f50322d commit 64c01ac
Show file tree
Hide file tree
Showing 27 changed files with 35 additions and 28 deletions.
2 changes: 1 addition & 1 deletion native/src/seal/c/batchencoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
//
///////////////////////////////////////////////////////////////////////////

#include <stdint.h>
#include "seal/c/defines.h"
#include <stdint.h>

SEAL_C_FUNC BatchEncoder_Create(void *context, void **batch_encoder);

Expand Down
2 changes: 1 addition & 1 deletion native/src/seal/c/biguint.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
//
///////////////////////////////////////////////////////////////////////////

#include <stdint.h>
#include "seal/c/defines.h"
#include <stdint.h>

SEAL_C_FUNC BigUInt_Create1(void **bui);

Expand Down
2 changes: 1 addition & 1 deletion native/src/seal/c/ciphertext.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
//
///////////////////////////////////////////////////////////////////////////

#include <stdint.h>
#include "seal/c/defines.h"
#include <stdint.h>

SEAL_C_FUNC Ciphertext_Create1(void *pool, void **cipher);

Expand Down
2 changes: 1 addition & 1 deletion native/src/seal/c/ckksencoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
//
///////////////////////////////////////////////////////////////////////////

#include <stdint.h>
#include "seal/c/defines.h"
#include <stdint.h>

SEAL_C_FUNC CKKSEncoder_Create(void *context, void **ckks_encoder);

Expand Down
2 changes: 1 addition & 1 deletion native/src/seal/c/contextdata.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
//
///////////////////////////////////////////////////////////////////////////

#include <stdint.h>
#include "seal/c/defines.h"
#include <stdint.h>

SEAL_C_FUNC ContextData_Destroy(void *thisptr);

Expand Down
2 changes: 1 addition & 1 deletion native/src/seal/c/decryptor.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
//
///////////////////////////////////////////////////////////////////////////

#include <stdint.h>
#include "seal/c/defines.h"
#include <stdint.h>

SEAL_C_FUNC Decryptor_Create(void *context, void *secret_key, void **decryptor);

Expand Down
2 changes: 1 addition & 1 deletion native/src/seal/c/encryptionparameterqualifiers.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
//
///////////////////////////////////////////////////////////////////////////

#include <stdint.h>
#include "seal/c/defines.h"
#include <stdint.h>

SEAL_C_FUNC EPQ_Create(void *copy, void **epq);

Expand Down
2 changes: 1 addition & 1 deletion native/src/seal/c/encryptionparameters.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
//
///////////////////////////////////////////////////////////////////////////

#include <stdint.h>
#include "seal/c/defines.h"
#include <stdint.h>

SEAL_C_FUNC EncParams_Create1(uint8_t scheme, void **enc_params);

Expand Down
2 changes: 1 addition & 1 deletion native/src/seal/c/encryptor.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
//
///////////////////////////////////////////////////////////////////////////

#include <stdint.h>
#include "seal/c/defines.h"
#include <stdint.h>

SEAL_C_FUNC Encryptor_Create(void *context, void *public_key, void *secret_key, void **encryptor);

Expand Down
8 changes: 5 additions & 3 deletions native/src/seal/c/evaluator.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
//
///////////////////////////////////////////////////////////////////////////

#include <stdint.h>
#include "seal/c/defines.h"
#include <stdint.h>

SEAL_C_FUNC Evaluator_Create(void *sealContext, void **evaluator);

Expand Down Expand Up @@ -55,7 +55,8 @@ SEAL_C_FUNC Evaluator_RescaleTo(void *thisptr, void *encrypted, uint64_t *parms_
SEAL_C_FUNC Evaluator_Exponentiate(
void *thisptr, void *encrypted, uint64_t exponent, void *relin_keys, void *destination, void *pool);

SEAL_C_FUNC Evaluator_TransformToNTT1(void *thisptr, void *plain, uint64_t *parms_id, void *destination_ntt, void *pool);
SEAL_C_FUNC Evaluator_TransformToNTT1(
void *thisptr, void *plain, uint64_t *parms_id, void *destination_ntt, void *pool);

SEAL_C_FUNC Evaluator_TransformToNTT2(void *thisptr, void *encrypted, void *destination_ntt);

Expand All @@ -72,6 +73,7 @@ SEAL_C_FUNC Evaluator_RotateColumns(void *thisptr, void *encrypted, void *galois
SEAL_C_FUNC Evaluator_RotateVector(
void *thisptr, void *encrypted, int steps, void *galois_keys, void *destination, void *pool);

SEAL_C_FUNC Evaluator_ComplexConjugate(void *thisptr, void *encrypted, void *galois_keys, void *destination, void *pool);
SEAL_C_FUNC Evaluator_ComplexConjugate(
void *thisptr, void *encrypted, void *galois_keys, void *destination, void *pool);

SEAL_C_FUNC Evaluator_ContextUsingKeyswitching(void *thisptr, bool *using_keyswitching);
2 changes: 1 addition & 1 deletion native/src/seal/c/galoiskeys.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
//
///////////////////////////////////////////////////////////////////////////

#include <stdint.h>
#include "seal/c/defines.h"
#include <stdint.h>

SEAL_C_FUNC GaloisKeys_GetIndex(uint64_t galois_elt, uint64_t *index);
2 changes: 1 addition & 1 deletion native/src/seal/c/intencoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
//
///////////////////////////////////////////////////////////////////////////

#include <stdint.h>
#include "seal/c/defines.h"
#include <stdint.h>

SEAL_C_FUNC IntegerEncoder_Create(void *context, void **encoder);

Expand Down
2 changes: 1 addition & 1 deletion native/src/seal/c/keygenerator.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
//
///////////////////////////////////////////////////////////////////////////

#include <stdint.h>
#include "seal/c/defines.h"
#include <stdint.h>

SEAL_C_FUNC KeyGenerator_Create1(void *sealContext, void **key_generator);

Expand Down
2 changes: 1 addition & 1 deletion native/src/seal/c/kswitchkeys.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
//
///////////////////////////////////////////////////////////////////////////

#include <stdint.h>
#include "seal/c/defines.h"
#include <stdint.h>

SEAL_C_FUNC KSwitchKeys_Create1(void **kswitch_keys);

Expand Down
2 changes: 1 addition & 1 deletion native/src/seal/c/memorymanager.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
//
///////////////////////////////////////////////////////////////////////////

#include <stdint.h>
#include "seal/c/defines.h"
#include <stdint.h>

SEAL_C_FUNC MemoryManager_GetPool1(int prof_opt, bool clear_on_destruction, void **pool_handle);

Expand Down
2 changes: 1 addition & 1 deletion native/src/seal/c/memorypoolhandle.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
//
///////////////////////////////////////////////////////////////////////////

#include <stdint.h>
#include "seal/c/defines.h"
#include <stdint.h>

SEAL_C_FUNC MemoryPoolHandle_Create1(void **handle);

Expand Down
2 changes: 1 addition & 1 deletion native/src/seal/c/modulus.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
//
///////////////////////////////////////////////////////////////////////////

#include <stdint.h>
#include "seal/c/defines.h"
#include <stdint.h>

SEAL_C_FUNC CoeffModulus_MaxBitCount(uint64_t poly_modulus_degree, int sec_level, int *bit_count);

Expand Down
2 changes: 1 addition & 1 deletion native/src/seal/c/plaintext.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
//
///////////////////////////////////////////////////////////////////////////

#include <stdint.h>
#include "seal/c/defines.h"
#include <stdint.h>

SEAL_C_FUNC Plaintext_Create1(void *memoryPoolHandle, void **plaintext);

Expand Down
2 changes: 1 addition & 1 deletion native/src/seal/c/publickey.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
//
///////////////////////////////////////////////////////////////////////////

#include <stdint.h>
#include "seal/c/defines.h"
#include <stdint.h>

SEAL_C_FUNC PublicKey_Create1(void **public_key);

Expand Down
2 changes: 1 addition & 1 deletion native/src/seal/c/relinkeys.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
//
///////////////////////////////////////////////////////////////////////////

#include <stdint.h>
#include "seal/c/defines.h"
#include <stdint.h>

SEAL_C_FUNC RelinKeys_GetIndex(uint64_t key_power, uint64_t *index);
2 changes: 1 addition & 1 deletion native/src/seal/c/sealcontext.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
//
///////////////////////////////////////////////////////////////////////////

#include <stdint.h>
#include "seal/c/defines.h"
#include <stdint.h>

SEAL_C_FUNC SEALContext_Create(void *encryptionParams, bool expand_mod_chain, int sec_level, void **context);

Expand Down
2 changes: 1 addition & 1 deletion native/src/seal/c/secretkey.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
//
///////////////////////////////////////////////////////////////////////////

#include <stdint.h>
#include "seal/c/defines.h"
#include <stdint.h>

SEAL_C_FUNC SecretKey_Create1(void **secret_key);

Expand Down
2 changes: 1 addition & 1 deletion native/src/seal/c/serialization.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
//
///////////////////////////////////////////////////////////////////////////

#include <stdint.h>
#include "seal/c/defines.h"
#include <stdint.h>

SEAL_C_FUNC Serialization_SEALMagic(uint16_t *result);

Expand Down
2 changes: 1 addition & 1 deletion native/src/seal/c/smallmodulus.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
//
///////////////////////////////////////////////////////////////////////////

#include <stdint.h>
#include "seal/c/defines.h"
#include <stdint.h>

SEAL_C_FUNC SmallModulus_Create1(uint64_t value, void **small_modulus);

Expand Down
2 changes: 1 addition & 1 deletion native/src/seal/c/valcheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
// Licensed under the MIT license.

// SEALNet
#include "seal/c/valcheck.h"
#include "seal/c/stdafx.h"
#include "seal/c/utilities.h"
#include "seal/c/valcheck.h"

// SEAL
#include "seal/valcheck.h"
Expand Down
2 changes: 1 addition & 1 deletion native/src/seal/c/valcheck.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
//
///////////////////////////////////////////////////////////////////////////

#include <stdint.h>
#include "seal/c/defines.h"
#include <stdint.h>

SEAL_C_FUNC ValCheck_Plaintext_IsValidFor(void *plaintext, void *context, bool *result);

Expand Down
5 changes: 5 additions & 0 deletions tools/scripts/clang-format-all.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
BASE_DIR=$(dirname "$0")
SEAL_ROOT_DIR=$BASE_DIR/../../
cd $SEAL_ROOT_DIR
clang-format -i $SEAL_ROOT_DIR/native/**/*.h
clang-format -i $SEAL_ROOT_DIR/native/**/*.cpp

0 comments on commit 64c01ac

Please sign in to comment.