DPC++ Runtime
Runtime libraries for oneAPI DPC++
config.cpp File Reference
#include <CL/sycl/detail/common.hpp>
#include <CL/sycl/detail/defines_elementary.hpp>
#include <CL/sycl/detail/os_util.hpp>
#include <detail/config.hpp>
#include <cstring>
#include <fstream>
#include <iostream>
#include <limits>
#include "detail/config.def"
Include dependency graph for config.cpp:

Go to the source code of this file.

Namespaces

 cl
 We provide new interfaces for matrix muliply in this patch:
 
 cl::sycl
 
 cl::sycl::detail
 

Macros

#define SYCL_CONFIG_FILE_NAME   "sycl.conf"
 
#define CONFIG(Name, MaxSize, CompileTimeDef)
 
#define CONFIG(Name, MaxSize, CompileTimeDef)
 
#define CONFIG(Name, MaxSize, CompileTimeDef)
 

Functions

static void cl::sycl::detail::initValue (const char *Key, const char *Value)
 
void cl::sycl::detail::readConfig (bool ForceInitialization)
 
void cl::sycl::detail::dumpConfig ()
 
const std::array< std::pair< std::string, info::device_type >, 5 > & cl::sycl::detail::getSyclDeviceTypeMap ()
 
const std::array< std::pair< std::string, backend >, 7 > & cl::sycl::detail::getSyclBeMap ()
 

Macro Definition Documentation

◆ CONFIG [1/3]

#define CONFIG (   Name,
  MaxSize,
  CompileTimeDef 
)
Value:
const char *SYCLConfigBase<Name>::MValueFromFile = nullptr; \
char SYCLConfigBase<Name>::MStorage[MaxSize + 1]; \
const char *const SYCLConfigBase<Name>::MCompileTimeDef = \
getStrOrNullptr(__SYCL_STRINGIFY(CompileTimeDef)); \
const char *const SYCLConfigBase<Name>::MConfigName = __SYCL_STRINGIFY(Name);

Definition at line 27 of file config.cpp.

◆ CONFIG [2/3]

#define CONFIG (   Name,
  MaxSize,
  CompileTimeDef 
)
Value:
if (0 == strncmp(Key, SYCLConfigBase<Name>::MConfigName, MAX_CONFIG_NAME)) { \
strncpy(SYCLConfigBase<Name>::MStorage, Value, MaxSize); \
SYCLConfigBase<Name>::MStorage[MaxSize] = '\0'; \
SYCLConfigBase<Name>::MValueFromFile = SYCLConfigBase<Name>::MStorage; \
return; \
}

Definition at line 27 of file config.cpp.

◆ CONFIG [3/3]

#define CONFIG (   Name,
  MaxSize,
  CompileTimeDef 
)
Value:
{ \
const char *Val = SYCLConfigBase<Name>::getRawValue(); \
std::cerr << SYCLConfigBase<Name>::MConfigName << " : " \
<< (Val ? Val : "unset") << std::endl; \
}

Definition at line 27 of file config.cpp.

◆ SYCL_CONFIG_FILE_NAME

#define SYCL_CONFIG_FILE_NAME   "sycl.conf"

Definition at line 24 of file config.cpp.

cl::sycl::detail::MAX_CONFIG_NAME
constexpr int MAX_CONFIG_NAME
Definition: config.hpp:47
__SYCL_STRINGIFY
#define __SYCL_STRINGIFY(x)
Definition: defines_elementary.hpp:94