<commit_before>/*
 * File:  sorted_sequence.h
 * Copyright (C) 2006 The Institute for System Programming of the Russian Academy of Sciences (ISP RAS)
 */

#ifndef _SORTED_SEQUENCE_H
#define _SORTED_SEQUENCE_H

#include "sedna.h"
#include "pers_map.h"
#include "tuple.h"
#include "vmm.h"
#include "seq_common.h"

#define MAX_BLOCKS_IN_CHAIN 5 //should be changed after meeting with Andrey
#define GET_FREE_SPACE(p) (shft)((__uint32)PAGE_SIZE - (__uint32)((p).addr) & PAGE_REVERSE_BIT_MASK)
#ifndef min
#define min(x,y) ((x) < (y) ? (x) : (y))
#endif

typedef int (*compare_fn)(xptr v1,xptr v2, const void *);
typedef int (*get_size_fn)(tuple& t, const void *);
typedef void (*serialize_fn)(tuple& t,xptr v1, const void *);
typedef void (*serialize_2_blks_fn)(tuple& t,xptr& v1,shft size1,xptr& v2, const void *);
typedef void (*deserialize_fn)(tuple&,xptr& v1, const void *);
typedef void (*deserialize_2_blks_fn)(tuple& t,xptr& v1,shft size1,xptr& v2, const void *);<commit_msg>lazy sort 2<commit_after>/*
 * File:  sorted_sequence.h
 * Copyright (C) 2006 The Institute for System Programming of the Russian Academy of Sciences (ISP RAS)
 */

#ifndef _SORTED_SEQUENCE_H
#define _SORTED_SEQUENCE_H

#include "sedna.h"
#include "pers_map.h"
#include "tuple.h"
#include "vmm.h"
#include "seq_common.h"

#define MAX_BLOCKS_IN_CHAIN 500 //should be changed after meeting with Andrey
#define GET_FREE_SPACE(p) (shft)((__uint32)PAGE_SIZE - (__uint32)((p).addr) & PAGE_REVERSE_BIT_MASK)
#ifndef min
#define min(x,y) ((x) < (y) ? (x) : (y))
#endif

typedef int (*compare_fn)(xptr v1,xptr v2, const void *);
typedef int (*get_size_fn)(tuple& t, const void *);
typedef void (*serialize_fn)(tuple& t,xptr v1, const void *);
typedef void (*serialize_2_blks_fn)(tuple& t,xptr& v1,shft size1,xptr& v2, const void *);
typedef void (*deserialize_fn)(tuple&,xptr& v1, const void *);
typedef void (*deserialize_2_blks_fn)(tuple& t,xptr& v1,shft size1,xptr& v2, const void *);
{'fraction_non_alphanumeric': 0.147239263803681, 'fraction_numerical': 0.023006134969325152, 'mean_word_length': 6.22140221402214, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '356696', 'n_tokens_mistral': 791, 'n_tokens_neox': 741, 'n_words': 204}