<commit_before>// This is the driver program for SALLOC

#include <stdio.h>
#include <cuda.h>
#include "salloc_phase3.h"

#define CHUNK_SZ 32 // size of a chunk
#define CAP 16 // number of chunks in the chunk

typedef int T1; // 

__global__ void kernel1(GPUArena<CHUNK_SZ,T1> a, GPUChunk<CHUNK_SZ,T1>* v)
{
  printf("%p\n",v); 
}

__global__ void kernel(GPUArena<CHUNK_SZ,T1> a )

{
 a.get_new_chunk();
}
int main(int argc, char** argv)
{
  GPUArena<CHUNK_SZ, T1> arena(CAP);
  
/* This is the desired API for create vector  */
// GPUChunk<CHUNK_SZ, T1> * v1 = arena.createVector(); // returns the address of the next fully free chunk in arena(on GPU) and stores it on v1 on the CPU
  kernel<<<1,8>>>(arena); 
  cudaDeviceSynchronize();
  GPUChunk<CHUNK_SZ,T1> * v1 = arena.createVector();
  kernel1<<<1,1>>>(arena, v1);
  cudaDeviceSynchronize();
  return 0;
}<commit_msg>support for multi vector optimized<commit_after>// This is the driver program for SALLOC

#include <stdio.h>
#include <cuda.h>
#include "salloc_phase3.h"

#define CHUNK_SZ 32 // size of a chunk
#define CAP 16 // number of chunks in the chunk

typedef int T1; // 


__global__ void kernel(GPUArena<CHUNK_SZ,T1> a )

{
 a.get_new_chunk();
}

__global__ void kernel1(GPUArena<CHUNK_SZ,T1> a, GPUChunk<CHUNK_SZ,T1>* v)
{
  printf("%p\n",v); 
}

int main(int argc, char** argv)
{
  GPUArena<CHUNK_SZ, T1> arena(CAP);
  
/* This is the desired API for create vector  */
// GPUChunk<CHUNK_SZ, T1> * v1 = arena.createVector(); // returns the address of the next fully free chunk in arena(on GPU) and stores it on v1 on the CPU
  kernel<<<1,8>>>(arena); 
  cudaDeviceSynchronize();
  GPUChunk<CHUNK_SZ,T1> * v1 = arena.createVector();
  kernel1<<<1,1>>>(arena, v1);
  cudaDeviceSynchronize();
  return 0;
}
{'fraction_non_alphanumeric': 0.1422924901185771, 'fraction_numerical': 0.025974025974025976, 'mean_word_length': 4.321321321321322, 'pattern_counts': {'":': 0, '<': 31, '<?xml version=': 0, '>': 31, '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': '7272327', 'n_tokens_mistral': 720, 'n_tokens_neox': 694, 'n_words': 194}