[clean-list] htoclean sorrows

SevenThunders mattcbro at earthlink.net
Wed May 31 03:24:57 MEST 2006


Well that's interesting.  I had no luck, working on the same library for
quite some time.
This is working without using the MS linker hack and without using the
supplied acml static link library stub?  All the libraries are in the clean
systems file folder?  Is this the GCC compiled version of the acml library? 
Also I'd like to see your _library file.  Maybe my installation is corrupted
somehow or perhaps I inadvertently messed up a setting in the IDE.



John van Groningen wrote:
> 
> 
> Matthew Bromberg wrote:
>>Thank you for this information.  I have verified that the atlas .dll
library files are definately in ccall format. No doubt all the
>>other C compatible blas libraries are in this format as well.  Now the
strange thing
>>is that due to the limitations of the various library tools it is not
really possible to get them into a stdcall format in what I'd
>>call a finite amount of time.  One could ask the question, how would you
fix a third party .dll that uses a cdecl calling convention so that it works
with clean?
> 
> You don't have to. If you use ccall without a P at the beginning, the
> compiler
> will use the cdecl calling convention. This should also work if the other
> function is in a dll.
> 
> For example if I compile:
> 
> module daxpy
> 
> import StdEnv
> 
> import code from library "libacm_library";
> 
> daxpy :: !Int !Real !{#Real} !Int !{#Real} !Int -> Int;
> daxpy nlen alpha x x_d y y_d = code {
> 	ccall daxpy "IRAIAI:I"
> }
> 
> rmac :: !Real !{#Real} !{#Real} -> {#Real};
> rmac a x y
> 	# n = daxpy (size x) a x 1 y 1;
> 	| n==n
> 		= y;
> 
> Start
> 	= (
> 		rmac 2.0 {0.5, -0.5, 1.0, -1.0} { 1.0,  2.0,  3.0 , 4.0},
> 		rmac 3.0 {0.5, -0.5, 1.0, -1.0} {11.0, 12.0, 13.0, 14.0}
> 	)
> 
> 
> 
> With file libacm_library in the Clean System Files folder consisting of:
> 
> libacml.dll
> daxpy
> 
> 
> The program calls the daxpy function in the acml library from amd,
> and prints the correct results (on windows xp x64).
> 
> Kind regards,
> 
> John van Groningen
> 
> _______________________________________________
> clean-list mailing list
> clean-list at science.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/clean-list
> 
> 
--
View this message in context: http://www.nabble.com/htoclean+sorrows-t1598541.html#a4637727
Sent from the Clean forum at Nabble.com.



More information about the clean-list mailing list