Commit Graph

14 Commits

Author SHA1 Message Date
jpekkila
f3cb6e7049 Removed old unused tokens from the DSL grammar 2019-10-18 02:14:19 +03:00
jpekkila
7c79a98cdc Added support for various binary operations (>=, <=, /= etc). Also bitwise operators | and & are now allowed 2019-10-18 01:52:14 +03:00
jpekkila
44a86f5e80 acc: Removed debug prints, old code. Also the scope of the declarations made inside a for statement is now properly tracked 2019-10-08 00:20:57 +03:00
jpekkila
ff12332f06 Clarified the syntax for real number literals. 1.0 is the same precision as AcReal, 1.0f is an explicit float and 1.0d is an explicit double. 2019-10-07 18:24:32 +03:00
jpekkila
0e1d1b9fb4 Some optimizations for DSL compilation. Also a new feature: Inplace addition and subtraction += and -= are now allowed 2019-10-07 16:33:24 +03:00
jpekkila
d97f5b59ba Rewrote the Astaroth DSL compiler. More information and cleanup in the next commits. 2019-10-07 15:43:20 +03:00
jpekkila
a02fa349ce Commented out a grammar rule that was ambiguous 2019-10-03 01:52:56 +03:00
jpekkila
cc3c2eb926 Added WIP stuff for the Astaroth DSL compiler rewrite. Once this branch is finished only a single source file will be needed (file ending .ac). This revision is needed to decouple absolutely all implementation-specific stuff (f.ex. AC_dsx) from the core library and make life easier for everyone. The plan is to provide a standard library header written in the DSL containing the derivative operations instead of hardcoding them in the CUDA implementation. 2019-10-02 21:03:59 +03:00
jpekkila
a0037d1a44 Modified the syntax of writing real-valued literals with the DSL. Casts are not needed any more: f.ex. 1.0 is implicitly cast to AcReal. The syntax is now more consistent: reals must be explicitly written as a.b, where a and b are some integers. IMPORTANT: Previously the shorthands a. and .b were allowed, not anymore. Using those shorthands will result in a compilation error 2019-10-01 21:14:33 +03:00
jpekkila
a91da8388c Better code style in some of the acc source files 2019-09-24 15:50:20 +03:00
jpekkila
9e57aba9b7 New feature: ScalarArray. ScalarArrays are read-only 1D arrays containing max(mx, max(my, mz)) elements. ScalarArray is a new type of uniform and can be used for storing f.ex. forcing profiles. The DSL now also supports complex numbers and some basic arithmetic (exp, multiplication) 2019-09-02 21:26:57 +03:00
jpekkila
51cf1f1068 The C header is now generated from the DSL, stashing the changes just to be sure since I might overwrite something when updating the compilation scripts to work with this new scheme 2019-08-19 18:19:28 +03:00
jpekkila
b53cabbc44 Made the DSL syntax less confusing: Input and output arrays are now ScalarField and VectorFields instead of scalars and vectors. C++ initializers are now also possible, removing the need to declare Fields as int or int3 which was very confusing, like "what, you assing an int value to a real, what the &^%@?" 2019-08-08 21:07:36 +03:00
jpekkila
0e48766a68 Added Astaroth 2.0 2019-06-14 14:19:07 +03:00