Open mrprajesh opened 1 year ago
Let's follow these as our namespace
conventions. Prefix sp
meaning StarPlat
.
spcuda
spomp
spacc
spmpi
// header
namespace X
{
class Foo
{
public:
void TheFunc();
};
}
// cpp
namespace X
{
void Foo::TheFunc()
{
return;
}
}
We follow option 1 in Source
More notes
#ifndef
macros in headers.new
backend.
WorkingBranch
src/backends/backend_<new>
folder with .cpp
and .h
filegraphcode/generated_<new>
Makefile
where bin/<new>_dsl_cpp_generator.o
replace new
with two-letter short code of the new backend.bin/<new>_dsl_cpp_generator.o: backends/backend_<new>/dsl_cpp_generator.cpp backends/dslCodePad.h
$(CC) -c backends/backend_<new>/dsl_cpp_generator.cpp -o bin/<new>_dsl_cpp_generator.o
we should never miss out #ifndef macros in headers.
Or use #pragma once
Thanks, Rupesh. #pragma one
has one tiny drawback.
This feature is completed in working branch
as of https://github.com/nibeditabh/GraphDSL/commit/eb3482341b23c21ce2d10988b113c22738d6aaf0
except for MPI.
getUserVar
returning variable with no type. v in forall
With the heterogeneous backend Nibedita is working on, we will need all the three backends under the same binary.
Typically, our
make
should result in one executable (sayStarPlat
compiler) which can generate files for all the architectures. i.e., should outputcuda
,omp
, ormpi
files based on the cmd lineargs
. Currently, it ismake cuda
for cuda,make omp
, similarly to others.We may have to use
namespace
and modify ourmakefile
to achieve it. A small prototype here