#include "tests/vm/parallel-merge.h"
#include <stdio.h>
#include <syscall.h>
#include "tests/arc4.h"
#include "tests/lib.h"
#include "tests/main.h"
Go to the source code of this file.
Defines | |
#define | CHUNK_SIZE (128 * 1024) |
#define | CHUNK_CNT 8 |
#define | DATA_SIZE (CHUNK_CNT * CHUNK_SIZE) |
Functions | |
static void | init (void) |
static void | sort_chunks (const char *subprocess, int exit_status) |
static void | merge (void) |
static void | verify (void) |
void | parallel_merge (const char *child_name, int exit_status) |
Variables | |
unsigned char | buf1 [DATA_SIZE] |
unsigned char | buf2 [DATA_SIZE] |
size_t | histogram [256] |
#define CHUNK_CNT 8 |
Definition at line 14 of file parallel-merge.c.
#define CHUNK_SIZE (128 * 1024) |
Definition at line 13 of file parallel-merge.c.
#define DATA_SIZE (CHUNK_CNT * CHUNK_SIZE) |
Definition at line 15 of file parallel-merge.c.
static void init | ( | void | ) | [static] |
Definition at line 23 of file parallel-merge.c.
References arc4_crypt(), arc4_init(), buf1, histogram, arc4::i, and msg().
static void merge | ( | void | ) | [static] |
Definition at line 85 of file parallel-merge.c.
References buf1, buf2, CHUNK_CNT, CHUNK_SIZE, arc4::i, and msg().
void parallel_merge | ( | const char * | child_name, | |
int | exit_status | |||
) |
Definition at line 143 of file parallel-merge.c.
References init(), merge(), sort_chunks(), and verify().
Referenced by test_main().
static void sort_chunks | ( | const char * | subprocess, | |
int | exit_status | |||
) | [static] |
static void verify | ( | void | ) | [static] |
unsigned char buf1[DATA_SIZE] |
Definition at line 17 of file parallel-merge.c.
unsigned char buf2[DATA_SIZE] |
Definition at line 17 of file parallel-merge.c.
Definition at line 18 of file parallel-merge.c.