Tensor Tiling Library
 
Loading...
Searching...
No Matches
TTL_import_export.h File Reference
#include "TTL_core.h"
#include "opencl/TTL_import_export.h"
Include dependency graph for TTL_cpp/TTL_import_export.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define TTL_MAX(X, Y)
 

Functions

template<typename TENSORTYPE>
void TTL_import (const TTL_tensor< TENSORTYPE > internal_tensor, const TTL_tensor< TENSORTYPE > external_tensor, TTL_event *event)
 Import the external tensor to the internal tensor returning when complete.
 
template<typename TENSORTYPE>
void TTL_blocking_import (const TTL_tensor< TENSORTYPE > &internal_tensor, const TTL_tensor< TENSORTYPE > &external_tensor)
 Import the external tensor to the internal tensor returning when complete.
 
template<typename TENSORTYPE>
void TTL_import_sub_tensor (const TTL_sub_tensor< TENSORTYPE > &internal_sub_tensor, const TTL_tensor< TENSORTYPE > const_external_tensor, TTL_event *event)
 Implementation of TTL_import_sub_tensor.
 
template<typename TENSORTYPE>
void TTL_export (const TTL_tensor< TENSORTYPE > &internal_tensor, const TTL_tensor< TENSORTYPE > &external_tensor, TTL_event *event)
 Export the external tensor to the internal tensor returning when complete.
 
template<typename TENSORTYPE>
void TTL_blocking_export (const TTL_tensor< TENSORTYPE > &internal_tensor, const TTL_tensor< TENSORTYPE > &external_tensor)
 Export the external tensor to the internal tensor returning when complete.
 
static void * TTL_local_memset (void *const ptr, char value, int num)
 Fill block of local memory.
 
static void TTL_clear_void_space (void *const dst, const size_t x_offset, const size_t y_offset, size_t num_bytes_per_element, size_t num_elements_per_line, size_t dst_total_line_length, size_t num_lines, size_t total_lines, size_t num_planes)
 Clear any unpopulated space in the target area.
 
template<typename INT_TENSORTYPE, typename EXT_TENSORTYPE>
static TTL_shape TTL_import_pre_fill (const TTL_sub_tensor< INT_TENSORTYPE > internal_sub_tensor, const TTL_tensor< EXT_TENSORTYPE > const_external_tensor, INT_TENSORTYPE **const dst_address, EXT_TENSORTYPE **const src_address)
 

Macro Definition Documentation

◆ TTL_MAX

#define TTL_MAX ( X,
Y )
Value:
(((X) > (Y)) ? (X) : (Y))

Definition at line 24 of file TTL_cpp/TTL_import_export.h.

Function Documentation

◆ TTL_blocking_export()

template<typename TENSORTYPE>
void TTL_blocking_export ( const TTL_tensor< TENSORTYPE > & internal_tensor,
const TTL_tensor< TENSORTYPE > & external_tensor )

Export the external tensor to the internal tensor returning when complete.

Parameters
internal_tensorA TTL_int_tensor describing the internal tensor.
external_tensorA TTL_int_tensor describing the const external tensor.

Complete description of what not how here.

Definition at line 105 of file TTL_cpp/TTL_import_export.h.

◆ TTL_blocking_import()

template<typename TENSORTYPE>
void TTL_blocking_import ( const TTL_tensor< TENSORTYPE > & internal_tensor,
const TTL_tensor< TENSORTYPE > & external_tensor )

Import the external tensor to the internal tensor returning when complete.

Parameters
internal_tensorA TTL_int_tensor describing the internal tensor.
external_tensorA TTL_int_tensor describing the external tensor.

Complete description of what not how here.

Definition at line 50 of file TTL_cpp/TTL_import_export.h.

◆ TTL_clear_void_space()

static void TTL_clear_void_space ( void *const dst,
const size_t x_offset,
const size_t y_offset,
size_t num_bytes_per_element,
size_t num_elements_per_line,
size_t dst_total_line_length,
size_t num_lines,
size_t total_lines,
size_t num_planes )
inlinestatic

Clear any unpopulated space in the target area.

Parameters
dst
x_offset
y_offset
num_bytes_per_element
num_elements_per_line
dst_total_line_length
num_lines
total_lines
num_planes

Definition at line 144 of file TTL_cpp/TTL_import_export.h.

◆ TTL_export()

template<typename TENSORTYPE>
void TTL_export ( const TTL_tensor< TENSORTYPE > & internal_tensor,
const TTL_tensor< TENSORTYPE > & external_tensor,
TTL_event * event )

Export the external tensor to the internal tensor returning when complete.

Parameters
internal_tensorA TTL_int_tensor describing the internal tensor.
external_tensorA TTL_int_tensor describing the const external tensor.
eventA TTL_event type to allow detection of import completion.

Complete description of what not how here.

Definition at line 91 of file TTL_cpp/TTL_import_export.h.

◆ TTL_import()

template<typename TENSORTYPE>
void TTL_import ( const TTL_tensor< TENSORTYPE > internal_tensor,
const TTL_tensor< TENSORTYPE > external_tensor,
TTL_event * event )

Import the external tensor to the internal tensor returning when complete.

Parameters
internal_tensorA TTL_int_tensor describing the internal tensor.
external_tensorA TTL_int_tensor describing the const external tensor.
eventA TTL_event type to allow detection of import completion.

Complete description of what not how here.

Definition at line 36 of file TTL_cpp/TTL_import_export.h.

◆ TTL_import_pre_fill()

template<typename INT_TENSORTYPE, typename EXT_TENSORTYPE>
static TTL_shape TTL_import_pre_fill ( const TTL_sub_tensor< INT_TENSORTYPE > internal_sub_tensor,
const TTL_tensor< EXT_TENSORTYPE > const_external_tensor,
INT_TENSORTYPE **const dst_address,
EXT_TENSORTYPE **const src_address )
inlinestatic

Definition at line 168 of file TTL_cpp/TTL_import_export.h.

◆ TTL_import_sub_tensor()

template<typename TENSORTYPE>
void TTL_import_sub_tensor ( const TTL_sub_tensor< TENSORTYPE > & internal_sub_tensor,
const TTL_tensor< TENSORTYPE > const_external_tensor,
TTL_event * event )

Implementation of TTL_import_sub_tensor.

Parameters
internal_sub_tensorA TTL_int_tensor describing the internal tensor.
const_external_tensorA TTL_const_ext_tensor describing the external tensor.
eventA TTL_event type to allow detection of import completion.
See also
TTL_import for full API and parameter information

Definition at line 64 of file TTL_cpp/TTL_import_export.h.

◆ TTL_local_memset()

static void * TTL_local_memset ( void *const ptr,
char value,
int num )
inlinestatic

Fill block of local memory.

Sets the first num bytes of the block of memory pointed by ptr to the specified value (interpreted as an unsigned char).

Parameters
ptrPointer to the block of memory to fill.
valueValue to be set. The value is passed as an int, but the function fills the block of memory using the unsigned char conversion of this value.
numNumber of bytes to be set to the value.
Returns
ptr is to the output is returned.

Definition at line 122 of file TTL_cpp/TTL_import_export.h.