Block Class Reference

`#include <blocktools.h>`

## Public Member Functions

| Block (size_t sx, size_t sy, size_t sz, size_t inset, size_t xmidlen, size_t ymidlen, size_t zmidlen, unsigned int dpp=1)
| ~Block ()
double * | getOutBuffer (unsigned char subx, unsigned char suby, unsigned char subz)
double * | getOutBuffer (unsigned char bid)
double * | getInBuffer (unsigned char subx, unsigned char suby, unsigned char subz)
double * | getInBuffer (unsigned char bid)
size_t | getBuffSize (unsigned char subx, unsigned char suby, unsigned char subz)
size_t | getBuffSize (unsigned char bid)
size_t | startOffset (unsigned char subx, unsigned char suby, unsigned char subz)
void | displayBlock (unsigned char subx, unsigned char suby, unsigned char subz, bool out)
void | copyToBuffer (unsigned char buffid, double *src)
void | copyFromBuffer (unsigned char buffid, double *dest)
void | copyAllToBuffer (double *src)
void | copyUsedFromBuffer (double *dest)
void | setUsed (unsigned char buffid)

## Private Member Functions

void | populateDimsTable ()
void | populateOffsetTable (size_t inset, size_t xmidlen, size_t ymidlen, size_t zmidlen)
void | createBuffArrays (double *startaddress, double *buffptr[27], size_t inset, size_t xmidlen, size_t ymidlen, size_t zmidlen)

## Private Attributes

double * | inbuff
double * | outbuff
size_t | buffoffsets [27]
size_t | flatoffsets [27]
bool | used [27]
size_t | dims [27][3]
size_t | sx
size_t | sy
size_t | sz
size_t | inset
size_t | xmidlen
size_t | ymidlen
size_t | zmidlen
double * | inbuffptr [27]
double * | outbuffptr [27]
const unsigned int | dpsize

## Constructor & Destructor Documentation

## Block()

Block::Block | ( | size_t | sx,
|  | size_t | sy,
|  | size_t | sz,
|  | size_t | inset,
|  | size_t | xmidlen,
|  | size_t | ymidlen,
|  | size_t | zmidlen,
|  | unsigned int | dpp = `1`
| ) |  |

References createBuffArrays(), dims, dpsize, inbuff, inbuffptr, inset, outbuff, outbuffptr, populateDimsTable(), populateOffsetTable(), sx, sy, sz, used, xmidlen, ymidlen, and zmidlen.

## ~Block()

Block::~Block | ( |  | ) |

References inbuff, and outbuff.

## Member Function Documentation

## copyAllToBuffer()

void Block::copyAllToBuffer | ( | double * | src | ) |

References copyToBuffer().

## copyFromBuffer()

void Block::copyFromBuffer | ( | unsigned char | buffid,
|  | double * | dest
| ) |  |

References dims, dpsize, inbuffptr, inset, startOffset(), xmidlen, and ymidlen.

Referenced by copyUsedFromBuffer().

## copyToBuffer()

void Block::copyToBuffer | ( | unsigned char | buffid,
|  | double * | src
| ) |  |

References dims, dpsize, inset, outbuffptr, startOffset(), xmidlen, and ymidlen.

Referenced by copyAllToBuffer().

## copyUsedFromBuffer()

void Block::copyUsedFromBuffer | ( | double * | dest | ) |

References copyFromBuffer(), and used.

## createBuffArrays()

void Block::createBuffArrays | ( | double * | startaddress,
|  | double * | buffptr[27],
|  | size_t | inset,
|  | size_t | xmidlen,
|  | size_t | ymidlen,
|  | size_t | zmidlen
| ) |  |

private

References buffoffsets.

Referenced by Block().

## displayBlock()

void Block::displayBlock | ( | unsigned char | subx,
|  | unsigned char | suby,
|  | unsigned char | subz,
|  | bool | out
| ) |  |

References dims, dpsize, inbuffptr, and outbuffptr.

## getBuffSize() [1/2]

size_t Block::getBuffSize | ( | unsigned char | bid | ) |

References dims, and dpsize.

## getBuffSize() [2/2]

size_t Block::getBuffSize | ( | unsigned char | subx,
|  | unsigned char | suby,
|  | unsigned char | subz
| ) |  |

References dims, and dpsize.

## getInBuffer() [1/2]

double * Block::getInBuffer | ( | unsigned char | bid | ) |

References inbuffptr.

## getInBuffer() [2/2]

double * Block::getInBuffer | ( | unsigned char | subx,
|  | unsigned char | suby,
|  | unsigned char | subz
| ) |  |

References inbuffptr.

## getOutBuffer() [1/2]

double * Block::getOutBuffer | ( | unsigned char | bid | ) |

References outbuffptr.

## getOutBuffer() [2/2]

double * Block::getOutBuffer | ( | unsigned char | subx,
|  | unsigned char | suby,
|  | unsigned char | subz
| ) |  |

References outbuffptr.

## populateDimsTable()

void Block::populateDimsTable | ( |  | ) |

private

References dims, inset, xmidlen, ymidlen, and zmidlen.

Referenced by Block().

## populateOffsetTable()

void Block::populateOffsetTable | ( | size_t | inset,
|  | size_t | xmidlen,
|  | size_t | ymidlen,
|  | size_t | zmidlen
| ) |  |

private

References buffoffsets, dims, dpsize, and flatoffsets.

Referenced by Block().

## setUsed()

void Block::setUsed | ( | unsigned char | buffid | ) |

References used.

## startOffset()

size_t Block::startOffset | ( | unsigned char | subx,
|  | unsigned char | suby,
|  | unsigned char | subz
| ) |  |

References dpsize, inset, xmidlen, ymidlen, and zmidlen.

Referenced by copyFromBuffer(), and copyToBuffer().

## Member Data Documentation

## buffoffsets

size_t Block::buffoffsets[27]

private

Referenced by createBuffArrays(), and populateOffsetTable().

## dims

size_t Block::dims[27][3]

private

Referenced by Block(), copyFromBuffer(), copyToBuffer(), displayBlock(), getBuffSize(), populateDimsTable(), and populateOffsetTable().

## dpsize

const unsigned int Block::dpsize

private

Referenced by Block(), copyFromBuffer(), copyToBuffer(), displayBlock(), getBuffSize(), populateOffsetTable(), and startOffset().

## flatoffsets

size_t Block::flatoffsets[27]

private

Referenced by populateOffsetTable().

## inbuff

double* Block::inbuff

private

Referenced by Block(), and ~Block().

## inbuffptr

double* Block::inbuffptr[27]

private

Referenced by Block(), copyFromBuffer(), displayBlock(), and getInBuffer().

## inset

size_t Block::inset

private

Referenced by Block(), copyFromBuffer(), copyToBuffer(), populateDimsTable(), and startOffset().

## outbuff

double* Block::outbuff

private

Referenced by Block(), and ~Block().

## outbuffptr

double* Block::outbuffptr[27]

private

Referenced by Block(), copyToBuffer(), displayBlock(), and getOutBuffer().

## sx

size_t Block::sx

private

Referenced by Block().

## sy

size_t Block::sy

private

Referenced by Block().

## sz

size_t Block::sz

private

Referenced by Block().

## used

bool Block::used[27]

private

Referenced by Block(), copyUsedFromBuffer(), and setUsed().

## xmidlen

size_t Block::xmidlen

private

Referenced by Block(), copyFromBuffer(), copyToBuffer(), populateDimsTable(), and startOffset().

## ymidlen

size_t Block::ymidlen

private

Referenced by Block(), copyFromBuffer(), copyToBuffer(), populateDimsTable(), and startOffset().

## zmidlen

size_t Block::zmidlen

private

Referenced by Block(), populateDimsTable(), and startOffset().

The documentation for this class was generated from the following files:

- blocktools.h
- blocktools.cpp