473,387 Members | 1,504 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Embedding native code in a .NET DLL


I would like to embed a high-performance native-code BLAS implementation in
a .NET DLL. What is the recommended way of doing this?

--
Dr Jon D Harrop, Flying Frog Consultancy
http://www.ffconsultancy.com/products/?u
Jun 27 '08 #1
6 2531
On Apr 28, 8:49*am, Jon Harrop <j...@ffconsultancy.comwrote:
I would like to embed a high-performance native-code BLAS implementation in
a .NET DLL. What is the recommended way of doing this?

--
Dr Jon D Harrop, Flying Frog Consultancyhttp://www.ffconsultancy.com/products/?u
Hi,

I do not think you can do that. you will have to distribute both dlls.
Jun 27 '08 #2
Ignacio Machin ( .NET/ C# MVP ) wrote:
On Apr 28, 8:49*am, Jon Harrop <j...@ffconsultancy.comwrote:
>I would like to embed a high-performance native-code BLAS implementation
in a .NET DLL. What is the recommended way of doing this?

--
Dr Jon D Harrop, Flying Frog
Consultancyhttp://www.ffconsultancy.com/products/?u

Hi,

I do not think you can do that. you will have to distribute both dlls.
Ok, thanks. Is it possible to have an optional dependency on another DLL? So
users could provide their own BLAS implementation and our DLL would use it
if available but would resort to managed code otherwise?

--
Dr Jon D Harrop, Flying Frog Consultancy
http://www.ffconsultancy.com/products/?u
Jun 27 '08 #3
Jon Harrop wrote:
I would like to embed a high-performance native-code BLAS
implementation in a .NET DLL. What is the recommended way of doing
this?
C++

Specifically, C++/CLI. The native code doesn't have to be C++ though, you
can link any static library with a C++/CLI wrapper into a single mixed-mode
assembly.

Note that this is the wrong group for such things, which is why you'll get
people telling you it can't be done.
Jun 27 '08 #4
Ben Voigt [C++ MVP] wrote:
Specifically, C++/CLI. The native code doesn't have to be C++ though, you
can link any static library with a C++/CLI wrapper into a single
mixed-mode assembly.
Can I then statically link that DLL into a C# DLL?
Note that this is the wrong group for such things, which is why you'll get
people telling you it can't be done.
What is a more appropriate (language agnostic if possible) group?

Thanks,
--
Dr Jon D Harrop, Flying Frog Consultancy
http://www.ffconsultancy.com/products/?u
Jun 27 '08 #5
Jon Harrop wrote:
Ben Voigt [C++ MVP] wrote:
>Specifically, C++/CLI. The native code doesn't have to be C++
though, you can link any static library with a C++/CLI wrapper into
a single mixed-mode assembly.

Can I then statically link that DLL into a C# DLL?
You said "into a .NET DLL". The C++/CLI compiler creates assemblies that
can be used from any .NET language, just as if it were a C# DLL.

You can also compile your whole program into .netmodule files and use the
C++/CLI linker to create the executable. The C# compiler hasn't any concept
of static linking though, you must use the C++/CLI linker for this even if
some of the code was compiled in C#.
>
>Note that this is the wrong group for such things, which is why
you'll get people telling you it can't be done.

What is a more appropriate (language agnostic if possible) group?

Thanks,

Jun 27 '08 #6
>Note that this is the wrong group for such things, which is why
>you'll get people telling you it can't be done.

What is a more appropriate (language agnostic if possible) group?
m.p.dotnet.languages.vc
m.p.dotnet.framework.interop
>
Thanks,

Jun 27 '08 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Max Powers | last post by:
I've spent an interesting day searching the web for help with calling OCaml functions from a python program and have come to the newsgroup for some advice (unfortunately I'm learning both languages...
4
by: Alicia Haumann | last post by:
I accidentally sent this to webmaster@python.org, so this could be a duplicate if "webmaster" forwards it to this list. :{ Hi, there. Thanks for any help that can be offered. I've been...
3
by: Jim Hargrave | last post by:
I've read that it is possible to compile jython to native code using GCJ. PyLucene uses this approach, they then use SWIG to create a Python wrapper around the natively compiled (java) Lucene. Has...
0
by: adsheehan | last post by:
Hi, I am embedding Python into a multi-threaded application running on Solaris. Python will enable end users to customize and re-program many aspects of the application. I expect that the C++...
1
by: amit | last post by:
Hello, I am currently studying how to embedd python. I am developing a graphical C++ application. My goal is to embedd python script that will control some kind of animation. I have some...
1
by: Bob | last post by:
I would appreciate any suggestions on handling the following... I currently have a VC++ MDI Application. The core pieces/products are all handled in separate dll's. Our shop has slowly been...
0
by: hq4000 | last post by:
Given AStyleSheet.xsl : <AStyleSheet> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.mytest.mytest2.mytest3.com" version="1.0"> <xsl:output method="xml"...
6
by: Qun Cao | last post by:
Hi Everyone, I am a beginner on cross language development. My problem at hand is to build a python interface for a C++ application built on top of a 3D game engine. The purpose of this python...
0
by: Tim Spens | last post by:
--- On Fri, 6/27/08, Tim Spens <t_spens@yahoo.comwrote: I think I know where the problem is but I'm unsure how to fix it. When I call Register_Handler(...) from python via...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.