Skip to content
This repository has been archived by the owner on Dec 9, 2024. It is now read-only.

Commit

Permalink
move constants away from global namespace to SDL (unless already in a…
Browse files Browse the repository at this point in the history
… namespace)
  • Loading branch information
slava77devel committed Dec 28, 2023
1 parent 74e4126 commit 10fe919
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
6 changes: 3 additions & 3 deletions SDL/Constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
#include <cuda_fp16.h>
#endif

namespace SDL
{
// Half precision wrapper functions.
#if defined(FP16_Base)
#define __F2H __float2half
Expand Down Expand Up @@ -141,8 +143,6 @@ const unsigned int endcap_size = 9105;
const unsigned int modules_size = 26401;
const unsigned int pix_tot = 1796504;

namespace SDL
{
//defining the constant host device variables right up here
ALPAKA_STATIC_ACC_MEM_GLOBAL const float miniMulsPtScaleBarrel[6] = {0.0052, 0.0038, 0.0034, 0.0034, 0.0032, 0.0034};
ALPAKA_STATIC_ACC_MEM_GLOBAL const float miniMulsPtScaleEndcap[5] = {0.006, 0.006, 0.006, 0.006, 0.006};
Expand All @@ -159,7 +159,7 @@ namespace SDL
ALPAKA_STATIC_ACC_MEM_GLOBAL const float magnetic_field = 3.8112;
// Since C++ can't represent infinity, SDL_INF = 123456789 was used to represent infinity in the data table
ALPAKA_STATIC_ACC_MEM_GLOBAL const float SDL_INF = 123456789;
}
}//namespace SDL

namespace T5DNN
{
Expand Down
1 change: 1 addition & 0 deletions SDL/Event.cc
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include "Event.h"

using Acc = SDL::Acc;
SDL::modules* SDL::modulesInGPU = new SDL::modules();
SDL::modulesBuffer<Acc>* SDL::modulesBuffers = new SDL::modulesBuffer<Acc>(devAcc);
std::shared_ptr<SDL::pixelMap> SDL::pixelMapping = std::make_shared<pixelMap>();
Expand Down
4 changes: 1 addition & 3 deletions SDL/Module.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
#ifndef Module_cuh
#define Module_cuh

#include <map>
#include <iostream>

#include <alpaka/alpaka.hpp>
#include "Constants.h"

namespace SDL
Expand Down

0 comments on commit 10fe919

Please sign in to comment.