-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated license, improved README.md, added Makefile, test code
- Loading branch information
Showing
7 changed files
with
198 additions
and
130 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
Boost Software License - Version 1.0 - August 17th, 2003 | ||
|
||
Permission is hereby granted, free of charge, to any person or organization | ||
obtaining a copy of the software and accompanying documentation covered by | ||
this license (the "Software") to use, reproduce, display, distribute, | ||
execute, and transmit the Software, and to prepare derivative works of the | ||
Software, and to permit third-parties to whom the Software is furnished to | ||
do so, all subject to the following: | ||
|
||
The copyright notices in the Software and this entire statement, including | ||
the above license grant, this restriction and the following disclaimer, | ||
must be included in all copies of the Software, in whole or in part, and | ||
all derivative works of the Software, unless such copies or derivative | ||
works are solely in the form of machine-executable object code generated by | ||
a source language processor. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT | ||
SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE | ||
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, | ||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | ||
DEALINGS IN THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
PREFIX=/usr/local | ||
LIBDIR=$(PREFIX)/lib | ||
|
||
CFLAGS=-O | ||
|
||
NAME=vecLibFort | ||
SOURCE=$(NAME).c | ||
OBJECT=$(NAME).o | ||
LIBRARY=lib$(NAME) | ||
STATIC=$(LIBRARY).a | ||
DYNAMIC=$(LIBRARY).dylib | ||
PRELOAD=$(LIBRARY)I.dylib | ||
INCLUDES=cloak.h static.h | ||
|
||
all: static dynamic preload | ||
static: $(STATIC) | ||
dynamic: $(DYNAMIC) | ||
preload: $(PRELOAD) | ||
|
||
$(STATIC): $(OBJECT) | ||
ar -cru $@ $^ | ||
ranlib $@ | ||
|
||
$(DYNAMIC): $(OBJECT) | ||
clang -shared -o $@ $^ \ | ||
-Wl,-reexport_framework -Wl,vecLib \ | ||
-install_name $(LIBDIR)/$@ | ||
|
||
$(PRELOAD): $(SOURCE) $(HEADERS) | ||
clang -shared -DVECLIBFORT_INTERPOSE -o $@ -O $(SOURCE) \ | ||
-Wl,-reexport_framework -Wl,vecLib \ | ||
-install_name $(LIBDIR)/$@ | ||
|
||
install: all | ||
mkdir -p $(LIBDIR) | ||
cp -f $(STATIC) $(LIBDIR) | ||
cp -f $(DYNAMIC) $(LIBDIR) | ||
cp -f $(PRELOAD) $(LIBDIR) | ||
|
||
clean: | ||
rm -f $(OBJECT) $(STATIC) $(DYNAMIC) $(PRELOAD) | ||
|
||
check: tester.f90 $(OBJECT) | ||
gfortran -o tester -O $^ -framework vecLib | ||
./tester | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,16 @@ | ||
/* | ||
This is free and unencumbered software released into the public domain. | ||
Anyone is free to copy, modify, publish, use, compile, sell, or | ||
distribute this software, either in source code form or as a compiled | ||
binary, for any purpose, commercial or non-commercial, and by any | ||
means. | ||
In jurisdictions that recognize copyright laws, the author or authors | ||
of this software dedicate any and all copyright interest in the | ||
software to the public domain. We make this dedication for the benefit | ||
of the public at large and to the detriment of our heirs and | ||
successors. We intend this dedication to be an overt act of | ||
relinquishment in perpetuity of all present and future rights to this | ||
software under copyright law. | ||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. | ||
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR | ||
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, | ||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
OTHER DEALINGS IN THE SOFTWARE. | ||
For more information, please refer to <http://unlicense.org/> | ||
Michael C. Grant, 21 March 2014 | ||
[email protected] | ||
vecLibFort | ||
https://github.com/mcg1969/vecLibFort | ||
Run-time F2C/GFORTRAN translation for Apple's vecLib BLAS/LAPACK | ||
Copyright (c) 2014 Michael C. Grant | ||
See README.md for full background and usage details. | ||
Use, modification and distribution is subject to the Boost Software | ||
License, Version 1.0. See the accompanying file LICENSE or | ||
http://www.booost.org/LICENSE_1_0.txt | ||
*/ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
real, dimension(2,6) :: a | ||
complex, dimension(2,4) :: b | ||
double complex, dimension(2,3) :: c | ||
|
||
real sdot, sdsdot, snrm2, sasum, scnrm2, scasum, slamch | ||
real slange, clange, slansy, clansy | ||
complex cdotu, cdotc | ||
double complex zdotu, zdotc | ||
|
||
a = transpose(reshape([1,3,2,4,3,5, 6,4,5,3,4,2],[6,2])) | ||
b = transpose(reshape([(1,2),(3,4),(5,6),(7,8), (8,1),(7,2),(6,3),(5,4)],[4,2])) | ||
c = transpose(reshape([(3,2),(2,4),(1,6), (4,6),(5,4),(6,2)],[3,2])) | ||
|
||
write(*,*) 'If the return value interface is fixed, none of these values will' | ||
write(*,*) 'be zero, nor will they be nonsensically large or small. On the' | ||
write(*,*) 'other hand, if the translation is incorrect, it is more likely' | ||
write(*,*) 'that this program will carsh.' | ||
write(*,*) ' ' | ||
|
||
write(*,*) sdot(6,a(1,:),1,a(2,:),1), sdsdot(6,2.0,a(1,:),1,a(2,:),1), & | ||
snrm2(6,a(1,:),1), sasum(6,a(2,:),1) | ||
write(*,*) cdotu(4,b(1,:),1,b(2,:),1), cdotc(4,b(1,:),1,b(2,:),1) | ||
write(*,*) scnrm2(4,b(1,:),1), scasum(4,b(2,:),1) | ||
write(*,*) zdotu(3,c(1,:),1,c(2,:),1) | ||
write(*,*) zdotc(3,c(1,:),1,c(2,:),1) | ||
|
||
write(*,*) slange('F',2,6,a,2,a),clange('F',2,4,b,2,b), & | ||
slansy('F','L',2,a,2,a),clansy('F','L',2,a,2,a) | ||
|
||
write(*,*) ' ' | ||
write(*,*) 'These are the machine constants generated by SLAMCH. We expect' | ||
write(*,*) 'some of them to be small (E-08,E-38).' | ||
write(*,*) ' ' | ||
|
||
write(*,*) slamch('E'),slamch('S'),slamch('B') | ||
write(*,*) slamch('P'),slamch('R'),slamch('M') | ||
write(*,*) slamch('U'),slamch('L'),slamch('O') | ||
|
||
end |
Oops, something went wrong.