Skip to content

Commit

Permalink
Separate FFT_CTX_clear and FFT_CTX_free.
Browse files Browse the repository at this point in the history
  • Loading branch information
dstebila committed Oct 15, 2014
1 parent 81fc653 commit b83bf33
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions fft.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ struct fft_ctx {
typedef struct fft_ctx FFT_CTX;

int FFT_CTX_init(FFT_CTX *ctx);
void FFT_CTX_clear(FFT_CTX *ctx);
void FFT_CTX_free(FFT_CTX *ctx);

void FFT_mul(uint32_t *z, const uint32_t *x, const uint32_t *y, FFT_CTX *ctx);
Expand Down
3 changes: 3 additions & 0 deletions rlwe_benchmark.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@ int main() {
TIME_OPERATION(rlwe_kex_compute_key_bob(b, s, c, k, &ctx), "rlwe_kex_compute_key_bob", ITERATIONS / 50)
TIME_OPERATION(rlwe_kex_compute_key_alice(b, s, c, k, &ctx), "rlwe_kex_compute_key_alice", ITERATIONS / 50)

FFT_CTX_clear(&ctx);
FFT_CTX_free(&ctx);

return 0;

}
1 change: 1 addition & 0 deletions rlwe_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ int main() {
return -1;
}

FFT_CTX_clear(&ctx);
FFT_CTX_free(&ctx);

return 0;
Expand Down

0 comments on commit b83bf33

Please sign in to comment.