Cyclops Tensor Framework
parallel arithmetic on multidimensional arrays
memcontrol.cxx File Reference
#include "malloc.h"
#include "sys/resource.h"
#include <stdint.h>
#include <iostream>
#include <unistd.h>
#include <stdlib.h>
#include <list>
#include <algorithm>
#include "../interface/common.h"
#include "util.h"
#include "omp.h"
#include "memcontrol.h"
#include <fstream>
Include dependency graph for memcontrol.cxx:

Go to the source code of this file.

Data Structures

struct  CTF_int::mem_loc




#define MAX_THREADS   256
#define CPY_BUFFER_SIZE   1000


void CTF_int::inc_tot_mem_used (int64_t a)
void CTF_int::set_mem_size (int64_t size)
 sets what fraction of the memory capacity CTF can use More...
void CTF_int::set_memcap (double cap)
 sets what fraction of the memory capacity CTF can use More...
std::list< mem_transfer > CTF_int::contract_mst ()
 gets rid of empty space on the stack More...
std::list< mem_loc > * CTF_int::get_mst ()
void CTF_int::mst_create (int64_t size)
 initializes stack buffer More...
void CTF_int::mem_create ()
 create instance of memory manager More...
void CTF_int::mem_exit (int rank)
 exit instance of memory manager More...
int CTF_int::mst_free (void *ptr)
 frees buffer allocated on stack More...
int CTF_int::mst_alloc_ptr (int64_t const len, void **const ptr)
 mst_alloc abstraction More...
void * CTF_int::mst_alloc (int64_t const len)
 mst_alloc allocates buffer on the specialized memory stack More...
int CTF_int::alloc_ptr (int64_t const len_, void **const ptr)
 alloc abstraction More...
void * CTF_int::alloc (int64_t const len)
 alloc abstraction More...
int CTF_int::untag_mem (void *ptr)
 stops tracking memory allocated by CTF, so user doesn't have to call free More...
int CTF_int::cdealloc (void *ptr, int const tid)
 free abstraction More...
int CTF_int::cdealloc_cond (void *ptr)
 free abstraction (conditional (no error if not found)) More...
int CTF_int::cdealloc (void *ptr)
 free abstraction More...
int CTF_int::get_num_instances ()
int64_t CTF_int::proc_bytes_used ()
 gives total memory used on this MPI process More...
int64_t CTF_int::proc_bytes_total ()
 gives total memory size per MPI process More...
int64_t CTF_int::proc_bytes_available ()
 gives total memory available on this MPI process More...


double CTF_int::memcap = 0.5
int64_t CTF_int::mem_size = 0
int CTF_int::max_threads
int CTF_int::instance_counter = 0
int64_t CTF_int::mem_used [MAX_THREADS]
int64_t CTF_int::tot_mem_used
int64_t CTF_int::tot_mem_available = -1
std::list< mem_loc > CTF_int::mem_stacks [MAX_THREADS]
void * CTF_int::mst_buffer = 0
int64_t CTF_int::mst_buffer_size = 0
int64_t CTF_int::mst_buffer_used = 0
int64_t CTF_int::mst_buffer_ptr = 0
std::list< mem_loc > CTF_int::mst
char * CTF_int::cpy_buffer [CPY_BUFFER_SIZE]

Macro Definition Documentation

#define CPY_BUFFER_SIZE   1000

Definition at line 104 of file memcontrol.cxx.

Referenced by CTF_int::contract_mst().

#define MAX_THREADS   256

Definition at line 73 of file memcontrol.cxx.