clang  19.0.0git
Classes | Public Types | Public Member Functions | List of all members
clang::SYCLIntegrationHeader Class Reference

#include "clang/Sema/SemaSYCL.h"

Public Types

enum  kernel_param_kind_t {
  kind_first , kind_accessor = kind_first , kind_std_layout , kind_sampler ,
  kind_pointer , kind_specialization_constants_buffer , kind_stream , kind_last = kind_stream
}
 

Public Member Functions

 SYCLIntegrationHeader (SemaSYCL &S)
 
void emit (raw_ostream &Out)
 Emits contents of the header into given stream. More...
 
bool emit (StringRef MainSrc)
 Emits contents of the header into a file with given name. More...
 
void startKernel (const FunctionDecl *SyclKernel, QualType KernelNameType, SourceLocation Loc, bool IsESIMD, bool IsUnnamedKernel, int64_t ObjSize)
 Signals that subsequent parameter descriptor additions will go to the kernel with given name. More...
 
void addParamDesc (kernel_param_kind_t Kind, int Info, unsigned Offset)
 Adds a kernel parameter descriptor to current kernel invocation descriptor. More...
 
void endKernel ()
 Signals that addition of parameter descriptors to current kernel invocation descriptor has finished. More...
 
void addSpecConstant (StringRef IDName, QualType IDType)
 Registers a specialization constant to emit info for it into the header. More...
 
void updateKernelNames (const FunctionDecl *SyclKernel, StringRef Name, StringRef StableName)
 Update the names of a kernel description based on its SyclKernel. More...
 
void addDeviceGlobalRegistration ()
 Signals that emission of __sycl_device_global_registration type and declaration of variable __sycl_device_global_registrar of this type in integration header is required. More...
 
void addHostPipeRegistration ()
 Signals that emission of __sycl_host_pipe_registration type and declaration of variable __sycl_host_pipe_registrar of this type in integration header is required. More...
 

Detailed Description

Definition at line 49 of file SemaSYCL.h.

Member Enumeration Documentation

◆ kernel_param_kind_t

Enumerator
kind_first 
kind_accessor 
kind_std_layout 
kind_sampler 
kind_pointer 
kind_specialization_constants_buffer 
kind_stream 
kind_last 

Definition at line 53 of file SemaSYCL.h.

Constructor & Destructor Documentation

◆ SYCLIntegrationHeader()

SYCLIntegrationHeader::SYCLIntegrationHeader ( SemaSYCL S)

Definition at line 6233 of file SemaSYCL.cpp.

Member Function Documentation

◆ addDeviceGlobalRegistration()

void clang::SYCLIntegrationHeader::addDeviceGlobalRegistration ( )
inline

Signals that emission of __sycl_device_global_registration type and declaration of variable __sycl_device_global_registrar of this type in integration header is required.

Definition at line 105 of file SemaSYCL.h.

◆ addHostPipeRegistration()

void clang::SYCLIntegrationHeader::addHostPipeRegistration ( )
inline

Signals that emission of __sycl_host_pipe_registration type and declaration of variable __sycl_host_pipe_registrar of this type in integration header is required.

Definition at line 112 of file SemaSYCL.h.

◆ addParamDesc()

void SYCLIntegrationHeader::addParamDesc ( kernel_param_kind_t  Kind,
int  Info,
unsigned  Offset 
)

Adds a kernel parameter descriptor to current kernel invocation descriptor.

Definition at line 6214 of file SemaSYCL.cpp.

References Offset.

◆ addSpecConstant()

void SYCLIntegrationHeader::addSpecConstant ( StringRef  IDName,
QualType  IDType 
)

Registers a specialization constant to emit info for it into the header.

Definition at line 6229 of file SemaSYCL.cpp.

◆ emit() [1/2]

void SYCLIntegrationHeader::emit ( raw_ostream &  Out)

◆ emit() [2/2]

bool SYCLIntegrationHeader::emit ( StringRef  MainSrc)

Emits contents of the header into a file with given name.

Returns true/false on success/failure.

Definition at line 6189 of file SemaSYCL.cpp.

References emit().

◆ endKernel()

void SYCLIntegrationHeader::endKernel ( )

Signals that addition of parameter descriptors to current kernel invocation descriptor has finished.

Definition at line 6225 of file SemaSYCL.cpp.

◆ startKernel()

void SYCLIntegrationHeader::startKernel ( const FunctionDecl SyclKernel,
QualType  KernelNameType,
SourceLocation  Loc,
bool  IsESIMD,
bool  IsUnnamedKernel,
int64_t  ObjSize 
)

Signals that subsequent parameter descriptor additions will go to the kernel with given name.

Starts new kernel invocation descriptor.

Definition at line 6205 of file SemaSYCL.cpp.

◆ updateKernelNames()

void clang::SYCLIntegrationHeader::updateKernelNames ( const FunctionDecl SyclKernel,
StringRef  Name,
StringRef  StableName 
)
inline

Update the names of a kernel description based on its SyclKernel.

Definition at line 92 of file SemaSYCL.h.

Referenced by clang::SemaSYCL::SetSYCLKernelNames().


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