Using AMD APP SDK with C#? [closed] - c#

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I have searched everywhere but couldn't find any definite information.
Are there any bindings or a support for using AMD APP SDK with C#?
I have seen that there is APARAPI for Java, does something similar exist for C#?
Main reason why I'm asking this is that I would like to try out HSA and hUMA features, but I don't want to waste time with C++.

Take a look at this option
GpuLinq It compiles LINQ code from C# or F# source to OpenCL. This isn't a generic C# API, but executes LINQ in parallel.,
From their Github Web page
"GpuLinq's main mission is to democratize GPGPU programming through LINQ. The main idea is that we represent the query as an Expression tree and after various transformations-optimizations we compile it into fast OpenCL kernel code. In addition we provide a very easy to work API without the need of messing with the details of the OpenCL API."
F# is a better fit for parallel programming on GPU's than C#, because is has parallel asynchronous patterns.
As of October 2014, HSA and hUMA are still very cutting edge. The Linux Kernel patch was in June 2014, Java support is coming in 2015, There may be problems with a C#/F# to OpenCL layered approach that are untested and untried with HSA. So trying to use a higher-level programming language may lead you to spend more time debugging infrastructure issues, than you would spend coding in C or C++.

I found this: OpenCL.net .NET bindings for OpenCL that are easy-to-use and true to the original API. There is no OOP abstraction, nor will there ever be. OpenCL.Net is meant to be small, fast (with as little explicit marshaling as possible) and .NET friendly at the same time.
https://www.nuget.org/packages/OpenCL.Net/

Related

What is the most efficient method in converting AutoLISP legacy code to C#? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I am engaged in a project that works mainly in AutoCAD to design and manufacture prefabricated building components such as roofing trusses. One of our goals is to redesign a program that was written in LISP that functions in designing roofing trusses. We are to rewrite the LISP code in C# and incrementally implement it into the current libraries that they have set up.
My problem is that I have been tasked with building a rudimentary LISP to C# converter. After some research (as Google results quickly show that such a thing does not readily exist on hand), I have come to the question of which way of converting this legacy code would be more efficient. Would it be better to take chunks of the LISP code to analyze and rewrite in C#, or should I continue on with developing a rudimentary converter for the AutoLISP code?
You should take chunks of the LISP code and rewrite in C#.
Even if it was less effort to write a general purpose LISP interpreter in C# than to rewrite the LISP in c# (which is highly improbable), the LISP is probably running AutoCAD commands like you would type in the AutoCAD command line instead doing things the ObjectARX way. So you would also need to convert the commands to use the ObjectARX API.
C# is a compiled object-oriented programming language whereas AutoLISP is an interpreted expression-oriented language. Therefore there is never going to be a really straightforward way of converting one to the other without a monumental effort.
Its worth noting that AutoLISP has flexibility to be modified quickly without needing to be recompiled. The benefit to using native in-process C# is that it's extremely fast versus a similar LISP approach. I've found there's a nice middle ground for maintaining the flexibility of LISP with the speed and power of C# which leverages the LispFunction command flag and ResultBuffer type in the .NET native API.

Linux Bioinformatics Tool [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 3 years ago.
Improve this question
I am looking to make a data visualization tool that will visualize biological data. I am used to being a C# and .net coder. However, as I understand it, you can run into trouble if you are running a C# app in ubuntu. Any suggestions for a language to use with these specifications in mind? I was thinking Java but am happy to take suggestions.
C# is a solid choice, especially if you already know the language. C# and the .NET framework have a solid cross-platform port with the Mono project and you can create Gnome UIs using the Gtk# bindings.
As an alternative, Java is used for a lot of bioinformatics applications. Though personally I have to say that most of those have horrible user interfaces and Java’s memory management seems ill-suited to deal with the data sizes that are common in bioinformatics – tools routinely run out of memory or become extremely slow. This isn’t necessarily an inherent problem of Java as much as sloppy programming, but Java certainly doesn’t help.
An alternative to Java would also be Python with a suitable GUI library (there are some good ones), especially since Python offers a much nicer, more polished syntax.
Yet another alternative that’s worthwhile especially if you’re really dealing with big data or if performance is important, would be C++ with Qt to build the GUI. Note that this will make development vastly more complicated if you’re not already proficient in C++.

C Parser in C# or generally .Net [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
For my diploma thesis I need to implement certain static C code analysis and I am desperately looking for a framework/library that would allow me to parse C source code, split it up into single functions, for every function determine what variables are changed in the function body and derive certain annotations for the code automatically.
Is there any good framework written in C# or generally as .Net class for this purpose?
What about googling for "C Parser written in C#"?
I got this as first link: http://code.google.com/p/cpp-ripper/
Also, I think the C grammar can be found in quite a lot of places, so you might just want to open up your .NET variant of lex/yacc and go from there?
You might like to check ANTLR. It comes with versions of several versions, included C and C#. There are some free grammars on ANTLR web site, including C.
I had a similiar problem and having done a research about YACC tools for C# I have chosen Gold Parsing System with Semantic Engine. My project was parsing SQL queries and generating logical query plans (from T-SQL grammar subset).
I really recommend it. Those 2 libraries make parsing stuff painless and allow to map grammar to the object model in your code. It feels very intuitive and made my project successful :) However, it may lack some advanced ANTLR features, so recognize your needs carefully.
Gold Project http://www.devincook.com/goldparser/
Semantic Engine Lib http://code.google.com/p/bsn-goldparser
If you're ok with using GPL'd code, you might want to take a look at the GCC source code. If you need to do it within .Net, you can always use p/invoke to call code from the GCC libraries.

How to implement C# syntax to use with own platform? ECMA Standard [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
I want to know, is this possible to use C# language syntax in own platform? I know that C# is ECMA standartized language. So how can it be implemented?
I know there are examples such as Mono & Unity3D who implemented C#.
So for example : One common class library (own, written in C) & C# as a programming language.
The problem is that I never did that before, so I am interested what should I read & where to start. Any other articles about implementing syntax will be good.
If you want to write a compiler for C#, the place to start is the Dragon Book, alongside a copy of the C# 4 spec. It's an awful lot of work though, and not for the faint of heart; you generally need years of experience to write a compiler for something as complicated as C#.
I recommend starting with a smaller language, maybe a trivial language like brainfuck, or looking at existing toy compilers.
imho there are a very few cases when you need to write your on parser / compiler etc.
I would do it in a different way.
First option would be to run .Net from your C application. You can for instance use Mono for that. Here is a description: http://www.mono-project.com/Embedding_Mono
The second option would be to use your c class library directly from C# applications. Check http://www.pinvoke.net/ for example on how to declare them.
One obvious option is to retarget the Mono AOT. This is how MonoTouch works, for example.
The hard route is to implement your own C# parser, compiler and a large part of its standard library.

Recommended open-source software to study C# and design patterns (MVC and others) [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I decided to start studying code from other developers to improve my coding skills.
I'm looking for a open-source software that uses MVC pattern, and also most design patterns possible.
Could you recommend some open-source software written in C# or VB.NET that uses as many design patters as possible or some code that worth studying?
I would recommend some projects like NServiceBus, which make extensive use of polymorphism (not to mention the NServiceBus API is one of the best APIs I've had the pleasure of using). Also consider something like StructureMap, which uses a model-based configuration API (I actually use Ninject as my IoC of choice, and it could prove to have some interesting code as well). It's hard for me to point out whether or not these projects use specific design patterns, and how many it may use, but I do know that they use some modern APIs and modern approaches to object oriented design.
I would say, though, that your best bet is going to be to find an open source project that you find interesting, or that you use regularly, and crack it open and see what makes it tick. If you are familiar with the details of using the code (whatever it may be), then you will probably gain more insight be looking at the code because you know what it is doing.
I always recommend .NET Domain-Driven Design with C#: Problem-Design-Solution sample code - SmartCA project. It is extremely elegantly laid out and I find myself going back to it whenever I have doubts about my architecture.
You should also download and check out ASP .NET MVC source code. It's got good examples of unit testing and mocking (which is something you will find yourself wanting to use).
I'd recommend checking out the Northwind Starter Kit (http://nsk.codeplex.com/) - it covers off on many design patterns and their application in the .Net framework, including SOA and MVC/MVP/PM concepts. It also includes examples of several other free-to-use libraries, such as Microsoft Entity Framework and NHibernate.
I'm personally particularly pleased with the way they show the same backend can be used with both WPF and ASP.Net.

Categories