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

Go to the source code of this file.

Macros

#define TTL_global(type)
 Create a typed reference in the __global address space.
 
#define TTL_global_printf   "%p"
 
#define TTL_local(type)
 Create a typed reference in the __local address space.
 
#define TTL_local_printf   "%p"
 

Typedefs

using TTL_dim = uint32_t
 The type used to hold the size of an object along any dimension.
 
using TTL_offset_dim = int32_t
 The type used to hold offsets and origins.
 

Macro Definition Documentation

◆ TTL_global

#define TTL_global ( type)
Value:
#define __global
The opencl __global namespace is not supported in C.

Create a typed reference in the __global address space.

Using this macro allows a global reference to be created in an implmentation indepedent way.

For example a pointer to a struct MyStruct in the global namespace.

TTL_global(MyStruct *)
#define TTL_global(type)
Create a typed reference in the __global address space.

for an unsigned int

TTL_global(unsigned int *)

Definition at line 44 of file TTL_cpp/opencl/TTL_types.h.

◆ TTL_global_printf

#define TTL_global_printf   "%p"

Different implementations use different types for global pointers, using TTL_global_printf allows for agnostic implementations.

TTL_global(MyStruct *) ptr_my_struct;
printf("Ptr to my struct " TTL_global_printf "\n", ptr_my_struct)
#define TTL_global_printf

Definition at line 57 of file TTL_cpp/opencl/TTL_types.h.

◆ TTL_local

#define TTL_local ( type)
Value:
__local type
#define __local
The opencl __local namespace is not supported in C.

Create a typed reference in the __local address space.

Using this macro allows a local reference to be created in an implmentation indepedent way.

For example a pointer to a struct MyStruct in the local namespace.

TTL_local(MyStruct *)
#define TTL_local(type)
Create a typed reference in the __local address space.

for an unsigned int

TTL_local(unsigned int *)

Definition at line 77 of file TTL_cpp/opencl/TTL_types.h.

◆ TTL_local_printf

#define TTL_local_printf   "%p"

Different implementations use different types for local pointers, using TTL_local_printf allows for agnostic implementations.

TTL_local(MyStruct *) ptr_my_struct;
printf("Ptr to my struct " TTL_local_printf "\n", ptr_my_struct)
#define TTL_local_printf

Definition at line 90 of file TTL_cpp/opencl/TTL_types.h.

Typedef Documentation

◆ TTL_dim

using TTL_dim = uint32_t

The type used to hold the size of an object along any dimension.

Definition at line 23 of file TTL_cpp/opencl/TTL_types.h.

◆ TTL_offset_dim

using TTL_offset_dim = int32_t

The type used to hold offsets and origins.

Definition at line 24 of file TTL_cpp/opencl/TTL_types.h.