I want to make a programming language that can harness GPU and is easier than C can embed in C code can export C code and is modular suitable for big projects.. Any idea? #140283
Unanswered
mostafa-technet
asked this question in
Programming Help
Replies: 1 comment 1 reply
-
Thanks for posting in the GitHub Community, @mostafa-technet ! We’ve moved your post to our Programming Help 🧑💻 category, which is more appropriate for this type of discussion. Please review our guidelines about the Programming Help category for more information. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Select Topic Area
Question
Body
It will be event driven it will have easy multi threading with run async and automatic parallelization (you will tell how many threads).. It makes it more modular for big project like you don't do memory allocation or freeing in other functions in a module etc.. It will also have collections based on trees that work by bitwise operations possible to do in CPU or GPU (I have created algorithms)..
Some codes I've written in C:
#define NEWGETARRAYVAR(NAME, THREADID, INDEX) (NAME[THREADID][INDEX])
#define NEWSETARRAYVAR(NAME, THREADID, INDEX, VARIABLE) (NAME[THREADID][INDEX] = VARIABLE)
#define NEWGETHEAPVAR(NAME, THREADID, TYPE) (TYPE)NEWGETARRAYVAR(&NAME, THREADID, 0)
#define NEWGETSTACKVAR(NAME, THREADID, TYPE) (TYPE)(NAME[THREADID])
#define NEWSETSTACKVAR(NAME, THREADID, VARIABLE) (NAME[THREADID] = VARIABLE)
#define NEWSETHEAPVAR(NAME, THREADID, VARIABLE) (NAME[THREADID] = VARIABLE)
#define _UNDEFINED -1256
void* rt[THREADCOUNT];
struct functionStr {
void** (f)(void, ...);
void* arg0;
va_list arg1;
};
struct functionStr FunCaller(int a, char* RType, ...) {
}
main()
apr_initialize();
apr_pool_t* pool;
atexit(apr_terminate);
apr_pool_create(&pool, NULL);
apr_pool_clear(pool);
NEWVARIABLE_ON_STACK(int, a);
NEWSERSTACKVAR(a, threadId, 10);
NEWVARIABLE_ON_HEAP(int, b);
if (NEWGETHEAPVAR(b, threadId, void*) != NULL) {
NEWSETHEAPVAR(b,threadId, 13);
time_t tm1 = time(NULL);int j4 = 0;
uv_thread_t tt[THREADCOUNT];
Beta Was this translation helpful? Give feedback.
All reactions