pax_global_header 0000666 0000000 0000000 00000000064 14756352071 0014524 g ustar 00root root 0000000 0000000 52 comment=6d1720fbe56843cb78575bdefe35115abce726c4
astra-toolbox-2.3.0/ 0000775 0000000 0000000 00000000000 14756352071 0014324 5 ustar 00root root 0000000 0000000 astra-toolbox-2.3.0/.github/ 0000775 0000000 0000000 00000000000 14756352071 0015664 5 ustar 00root root 0000000 0000000 astra-toolbox-2.3.0/.github/CODE_OF_CONDUCT.md 0000664 0000000 0000000 00000012152 14756352071 0020464 0 ustar 00root root 0000000 0000000 # Contributor Covenant Code of Conduct
## Our Pledge
We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, religion, or sexual identity
and orientation.
We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.
## Our Standards
Examples of behavior that contributes to a positive environment for our
community include:
* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
overall community
Examples of unacceptable behavior include:
* The use of sexualized language or imagery, and sexual attention or
advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email
address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
## Enforcement Responsibilities
Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.
Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.
## Scope
This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
astra@astra-toolbox.com. All complaints will be reviewed and investigated
promptly and fairly.
All community leaders are obligated to respect the privacy and security of the
reporter of any incident.
## Enforcement Guidelines
Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:
### 1. Correction
**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.
**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.
### 2. Warning
**Community Impact**: A violation through a single incident or series
of actions.
**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or
permanent ban.
### 3. Temporary Ban
**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.
**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.
### 4. Permanent Ban
**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.
**Consequence**: A permanent ban from any sort of public interaction within
the community.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0, available at
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
Community Impact Guidelines were inspired by [Mozilla's code of conduct
enforcement ladder](https://github.com/mozilla/diversity).
[homepage]: https://www.contributor-covenant.org
For answers to common questions about this code of conduct, see the FAQ at
https://www.contributor-covenant.org/faq. Translations are available at
https://www.contributor-covenant.org/translations.
astra-toolbox-2.3.0/.github/CONTRIBUTING.md 0000664 0000000 0000000 00000003077 14756352071 0020124 0 ustar 00root root 0000000 0000000 ## Contributing to ASTRA Toolbox
### Questions and discussions
If you have general questions about using the toolbox, feel free to open a [new discussion](https://github.com/astra-toolbox/astra-toolbox/discussions) on GitHub. We also suggest checking the available [documentation](https://astra-toolbox.com/docs/index.html) and [examples](https://github.com/astra-toolbox/astra-toolbox/tree/master/samples), as well as the existing [discussions](https://github.com/astra-toolbox/astra-toolbox/discussions) and [issues](https://github.com/astra-toolbox/astra-toolbox/issues) to get more information beforehand.
### Bugs and feature requests
If you find a bug in the code or would like to suggest adding a new feature to the toolbox, please confirm that it hasn't already been reported/suggested in the [GitHub repository](https://github.com/astra-toolbox/astra-toolbox/issues) and open a new issue following the suggested guidelines.
### Contributions to the code
We welcome contributions to the development of the toolbox and its [documentation](https://github.com/astra-toolbox/astra-toolbox.github.io), which can be submitted as [pull requests](https://github.com/astra-toolbox/astra-toolbox/pulls) on GitHub. The guidelines on building the development version of the toolbox can be found in the [documentation](https://astra-toolbox.com/docs/install.html). If you want to add a new feature or do a significant refactoring of the code, please first open a [new issue](https://github.com/astra-toolbox/astra-toolbox/issues) to coordinate how it fits into the scope and roadmap of the toolbox.
astra-toolbox-2.3.0/.github/ISSUE_TEMPLATE/ 0000775 0000000 0000000 00000000000 14756352071 0020047 5 ustar 00root root 0000000 0000000 astra-toolbox-2.3.0/.github/ISSUE_TEMPLATE/bug_report.md 0000664 0000000 0000000 00000002404 14756352071 0022541 0 ustar 00root root 0000000 0000000 ---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''
---
For questions and issues related to using the toolbox (not related to actual bugs in the code of the toolbox), please open a new discussion instead (https://github.com/astra-toolbox/astra-toolbox/discussions). We also recommend inspecting the existing documentation (https://astra-toolbox.com/docs/index.html) and examples (https://github.com/astra-toolbox/astra-toolbox/tree/master/samples).
1. Ensure the bug is not already reported (https://github.com/astra-toolbox/astra-toolbox/issues).
2. Provide a minimal reproducible example, if possible in code. Please use the code block functionality of GitHub (by using `/Code block` command or enclosing the code in triple grave mark symbols ``` ```).
3. Provide the version of ASTRA and source of installation (e.g. `astra-toolbox` channel in conda, `conda-forge` channel, pre-compiled binaries or manual installation).
4. (optional) For issues related to installation of ASTRA or to the CUDA functionality, please report the platform (Windows/Linux), the version of your Nvidia drivers, and in the case of conda installation the full list of packages installed in the environment, which can be obtained with `conda list` command.
astra-toolbox-2.3.0/.github/ISSUE_TEMPLATE/feature_request.md 0000664 0000000 0000000 00000000766 14756352071 0023605 0 ustar 00root root 0000000 0000000 ---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
astra-toolbox-2.3.0/.gitignore 0000664 0000000 0000000 00000001415 14756352071 0016315 0 ustar 00root root 0000000 0000000 .*.swp
.*.swo
*~
*.orig
*.rej
.nfs*
*.o
__pycache__
.vscode/*
# Cython-generated files
/python/astra/*.cpp
/python/astra/config.pxi
# Build files
/python/dist/*
/python/astra_toolbox.egg-info/*
/python/build/
/python/astra.lib
/build/conda/pkgs/*
/build/pypi/pkgs/*
/build/containers/podman/sw/*
/build/linux/.libs/*
/build/linux/Makefile
/build/linux/aclocal.m4
/build/linux/autom4te.cache/*
/build/linux/config.guess
/build/linux/config.log
/build/linux/config.status
/build/linux/config.sub
/build/linux/configure
/build/linux/cuda/*
/build/linux/install-sh
/build/linux/libastra.la
/build/linux/libastra.pc
/build/linux/libtool
/build/linux/ltmain.sh
/build/linux/src/*
/build/linux/matlab/*
/build/linux/python/*
# MSVC build output
/build/msvc/bin/
/build/msvc/release/
astra-toolbox-2.3.0/.travis.yml 0000664 0000000 0000000 00000003217 14756352071 0016440 0 ustar 00root root 0000000 0000000 language: python
os:
- linux
sudo: false
addons:
apt:
packages:
- libboost-all-dev
matrix:
include:
- env: CUDA=no CLANG=yes
python: "3.6"
- env: CUDA=no
python: "2.7"
- env: CUDA=no
python: "3.6"
- env: CUDA=yes
python: "2.7"
addons:
apt:
packages:
- libboost-all-dev
- nvidia-cuda-toolkit
- nvidia-cuda-dev
- nvidia-profiler
- env: CUDA=yes
python: "3.6"
addons:
apt:
packages:
- libboost-all-dev
- nvidia-cuda-toolkit
- nvidia-cuda-dev
- nvidia-profiler
exclude:
- os: linux
before_install:
- if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then
wget https://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh;
else
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
fi
- bash miniconda.sh -b -p $HOME/miniconda
- export PATH="$HOME/miniconda/bin:$PATH"
- conda config --set always_yes yes --set changeps1 no
- conda update conda
install:
- conda install python=$TRAVIS_PYTHON_VERSION six numpy scipy cython
- conda info -a
script:
- cd build/linux
- ./autogen.sh
- if [ x$CLANG == xyes ]; then export CXX=clang++; export CC=clang; fi
- if [ $CUDA == yes ]; then ./configure --prefix=$HOME/astra --with-python --with-cuda --with-install-type=module; else ./configure --prefix=$HOME/astra --with-python --without-cuda --with-install-type=module; fi
- make -j 4
- make test
- make install
- python -c "import astra; astra.test_noCUDA()"
astra-toolbox-2.3.0/COPYING 0000664 0000000 0000000 00000104513 14756352071 0015363 0 ustar 00root root 0000000 0000000 GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc.
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
Copyright (C)
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see .
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
Copyright (C)
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
.
astra-toolbox-2.3.0/NEWS.txt 0000664 0000000 0000000 00000013040 14756352071 0015637 0 ustar 00root root 0000000 0000000 -----------------------------------------------------------------------
This file is part of the ASTRA Toolbox
Copyright: 2010-2024, imec Vision Lab, University of Antwerp
2014-2024, CWI, Amsterdam
https://visielab.uantwerpen.be/ and https://www.cwi.nl/
License: Open Source under GPLv3
Contact: astra@astra-toolbox.com
Website: https://www.astra-toolbox.com/
-----------------------------------------------------------------------
2.3.0 (2025-02-22)
* add support for zero-copy linking of GPU/CPU arrays from Python libraries supporting the DLPack
standard, including PyTorch, TensorFlow, CuPy and JAX
* add support for using different filter types in FDK_CUDA.
The filter configuration for FDK_CUDA now matches that for FBP/FBP_CUDA.
* add conda packages for Python 3.13, CUDA 12.6, 12.8, and NumPy 2
* add automatic asynchronous execution to `astra.experimental` functions in Python
* add automatic splitting of FDK execution along angular dimension, allowing for larger maximum
number of projections
* add error reporting in `astra.algorithm.run` function
* add an extensive Python unit test suite
* fix incorrect results with GPUs with more than 48GB of memory
* fix multiple minor bugs
* require C++17, raising minimum system requirements to CUDA 11
* deprecate Python 3.7 conda packages
* remove boost and six dependencies
2.2.0 (2024-07-12)
* update Windows conda packages
* add support for python 3.12, cuda 12.5, and numpy 2.0
2.1.3 (2023-10-04)
* astra conda packages for cuda 11.6 and above now depend on nvidia's
modular cuda packages instead of on the monolithic cudatoolkit package.
This improves compatibility of our conda packages with pytorch.
* speed up FDK, especially when using multiple GPUs
* improve error reporting
2.1.2 (2022-09-09)
* fix set_gpu_index with Python 3.10
* fix set_gpu_index initializing GPU #0 before switching to the desired GPU
2.1.1 (2022-06-30)
* fix memory leak in cone beam FP
2.1.0 (2022-01-31)
* fix potential hang in CUDA FFT, and speed it up (for FBP_CUDA and FDK_CUDA)
* fix GPULink with rows not padded to multiple of 32 pixels
* fix output value scaling for short-scan FDK
* improve CUDA error logging
* fix compatibility issues with the conda-forge and nvidia conda channels
2.0.0 (2021-10-27)
* fix inconsistent scaling of output value depending on detector pixel size
See the 2020-01-17 news entry on astra-toolbox.com for more details
* add experimental interfaces to FP3D, BP3D, FDK to make ASTRA calls
by 3rd party toolboxes more efficient and flexible
* improve compatibility with modern Python, CUDA, Linux and Windows versions
1.9.0 (2018-2019)
* add 2D parallel_vec geometry
The old ExtraDetectorOffset option has been removed. Please use
parallel_vec to achieve this effect now
* fix inconsistent rotation direction in CPU fan beam code
* fix scaling of output values for FDK and fan beam FBP in some geometries
1.8.3 (2017-11-06)
* fix geometry memory leak in 3D FP/BP
* fix FDK short scan weighting
* add preliminary support for building on macOS
* add experimental support for using externally managed GPU memory from python
(see samples/python/s021_pygpu.py)
* our Linux conda python packages now have variants depending on the
cudatoolkit version
* add basic post-install tests test_CUDA/test_noCUDA (see README)
1.8 (2016-12-05)
* the Windows binary release now requires CUDA 8.0
* major changes to the way 'make install' works when building from source
* removed GPU memory size restrictions for FDK
* added multi-GPU support to 3D FP/BP/FDK
* added relaxation factor option to SIRT, SART
* fixed certain projections parallel to XZ or YZ planes
* fixed accumulating multiple raylengths in SART
* for matlab OpTomo, make output type match input type
* for python OpTomo, add FP/BP functions with optional 'out' argument
* fixed problems with non-US locales
1.7.1beta (2015-12-23)
* NB: This release has a beta tag as it contains two new
big experimental features.
* fix crash with certain 2D CUDA FP calls
1.7beta (2015-12-04)
* NB: This release has a beta tag as it contains two new
big experimental features.
* experimental MPI distributed computing support in Python
* experimental support in Python for FP and BP of objects
composited from multiple 3d data objects, at possibly different resolutions.
This also removes some restrictions on data size for 3D GPU FP and BP.
* support for Python algorithm plugins
* removed restrictions on volume geometries:
The volume no longer has to be centered.
Voxels still have to be cubes, but no longer 1x1x1.
* build fixes for newer platforms
* various consistency and bug fixes
1.6 (2015-05-29)
* integrate and improve python interface
* integrate opSpot-based opTomo operator
* build fixes for newer platforms
* various consistency and bug fixes
1.5 (2015-01-30)
* add support for fan beam FBP
* remove limits on number of angles in GPU code
(They are still limited by available memory, however)
* update the included version of the DART algorithm
* build fixes for newer platforms
* various consistency and bug fixes
1.4 (2014-04-07)
* various consistency and bug fixes
* add global astra_set_gpu_index
1.3 (2013-07-02)
* various consistency and bug fixes
* add a version of the DART algorithm (written by Wim van Aarle)
1.2 (2013-03-01)
* various consistency and bug fixes
1.1 (2012-10-24)
* add support for matlab single arrays in mex interface
1.0 (2012-08-22)
* first public release
astra-toolbox-2.3.0/README.md 0000664 0000000 0000000 00000015313 14756352071 0015606 0 ustar 00root root 0000000 0000000 # The ASTRA Toolbox
The ASTRA Toolbox is a MATLAB and Python toolbox of high-performance GPU primitives for 2D and 3D tomography.
We support 2D parallel and fan beam geometries, and 3D parallel and cone beam. All of them have highly flexible source/detector positioning.
A large number of 2D and 3D algorithms are available, including FBP, SIRT, SART, CGLS.
The basic forward and backward projection operations are GPU-accelerated, and directly callable from MATLAB and Python to enable building new algorithms.
## Documentation / samples
See the MATLAB and Python code samples in the `samples/` directory and on https://www.astra-toolbox.com/.
## Installation instructions
### Windows/Linux, using conda for Python packages
Requirements: [conda](https://conda.io/) Python environment, with 64 bit Python 3.9-3.13.
We provide packages for the ASTRA Toolbox in the `astra-toolbox` channel for the
conda package manager. We depend on CUDA packages available from the `nvidia`
channel. To install ASTRA into the current conda environement, run:
```
conda install -c astra-toolbox -c nvidia astra-toolbox
```
We also provide development packages between releases occasionally:
```
conda install -c astra-toolbox/label/dev -c nvidia astra-toolbox
```
### Linux, using pip for Python packages
Requirements: Python environment with 64 bit Python 3.9-3.13.
```
pip install astra-toolbox
```
Note that, unlike conda packages, we only provide packages built for Linux platform, and only with
a single reasonably recent version of CUDA toolkit. These packages depend on PyPI CUDA distribution
provided by NVIDIA.
### Windows, binary
Add the mex and tools subdirectories to your MATLAB path, or install the Python
wheel using pip. We require the Microsoft Visual Studio 2017 redistributable
package. If this is not already installed on your system, it is included as
vc_redist.x64.exe in the ASTRA zip file.
### Linux, from source
#### For MATLAB
Requirements: g++ (7 or higher), CUDA (11.0 or higher), MATLAB (R2012a or higher)
```
cd build/linux
./autogen.sh # when building a git version
./configure --with-cuda=/usr/local/cuda \
--with-matlab=/usr/local/MATLAB/R2012a \
--prefix=$HOME/astra \
--with-install-type=module
make
make install
```
Add $HOME/astra/matlab and its subdirectories (tools, mex) to your MATLAB path.
If you want to build the Octave interface instead of the MATLAB interface,
specify `--enable-octave` instead of `--with-matlab=...`. The Octave files
will be installed into $HOME/astra/octave . On some Linux distributions
building the Astra Octave interface will require the Octave development package
to be installed (e.g., liboctave-dev on Ubuntu).
NB: Each MATLAB version only supports a specific range of g++ versions.
Despite this, if you have a newer g++ and if you get errors related to missing
GLIBCXX_3.4.xx symbols, it is often possible to work around this requirement
by deleting the version of libstdc++ supplied by MATLAB in
MATLAB_PATH/bin/glnx86 or MATLAB_PATH/bin/glnxa64 (at your own risk),
or setting `LD_PRELOAD=/usr/lib64/libstdc++.so.6` (or similar) when starting
MATLAB.
#### For Python
Requirements: g++ (7 or higher), CUDA (11.0 or higher), Python (3.x), setuptools, Cython, scipy
```
cd build/linux
./autogen.sh # when building a git version
./configure --with-cuda=/usr/local/cuda \
--with-python \
--with-install-type=module
make
make install
```
This will install Astra into your current Python environment.
#### As a C++ library
Requirements: g++ (7 or higher), CUDA (11.0 or higher)
```
cd build/linux
./autogen.sh # when building a git version
./configure --with-cuda=/usr/local/cuda
make
make install-dev
```
This will install the Astra library and C++ headers.
### macOS, from source
Use the Homebrew package manager to install libtool, autoconf, automake.
```
cd build/linux
./autogen.sh
CPPFLAGS="-I/usr/local/include" NVCCFLAGS="-I/usr/local/include" ./configure \
--with-cuda=/usr/local/cuda \
--with-matlab=/Applications/MATLAB_R2016b.app \
--prefix=$HOME/astra \
--with-install-type=module
make
make install
```
### Windows, from source using Visual Studio 2017
Requirements: Visual Studio 2017 (full or community),
CUDA (11.0 or higher), MATLAB (R2012a or higher)
and/or Python 3.x + setuptools + Cython + scipy.
Using the Visual Studio IDE:
* Set the environment variable MATLAB_ROOT to your MATLAB install location.
* Open build\msvc\astra_vc14.sln in Visual Studio.
* Select the appropriate solution configuration (typically Release_CUDA|x64).
* Build the solution.
* Install by copying AstraCuda64.dll and all .mexw64 files from build\msvc\bin\x64\Release_CUDA
and the entire matlab\tools directory to a directory to be added to your MATLAB path.
Using .bat scripts in build\msvc:
* Edit build_env.bat and set up the correct library versions and paths.
* For MATLAB: Run build_matlab.bat. The .dll and .mexw64 files will be in build\msvc\bin\x64\Release_Cuda.
* For Python: Run build_python3.bat. Astra will be directly installed into site-packages.
## Testing your installation
To perform a (very) basic test of your ASTRA installation in Python, you can
run the following Python command.
```
import astra
astra.test()
```
To test your ASTRA installation in MATLAB, the equivalent command is:
```
astra_test
```
## References
If you use the ASTRA Toolbox for your research, we would appreciate it if you would refer to the following papers:
W. van Aarle, W. J. Palenstijn, J. Cant, E. Janssens, F. Bleichrodt, A. Dabravolski, J. De Beenhouwer, K. J. Batenburg, and J. Sijbers, “Fast and Flexible X-ray Tomography Using the ASTRA Toolboxâ€, Optics Express, 24(22), 25129-25147, (2016), https://dx.doi.org/10.1364/OE.24.025129
W. van Aarle, W. J. Palenstijn, J. De Beenhouwer, T. Altantzis, S. Bals, K. J. Batenburg, and J. Sijbers, “The ASTRA Toolbox: A platform for advanced algorithm development in electron tomographyâ€, Ultramicroscopy, 157, 35–47, (2015), https://dx.doi.org/10.1016/j.ultramic.2015.05.002
Additionally, if you use parallel beam GPU code, we would appreciate it if you would refer to the following paper:
W. J. Palenstijn, K J. Batenburg, and J. Sijbers, "Performance improvements for iterative electron tomography reconstruction using graphics processing units (GPUs)", Journal of Structural Biology, vol. 176, issue 2, pp. 250-253, 2011, https://dx.doi.org/10.1016/j.jsb.2011.07.017
## License
The ASTRA Toolbox is open source under the GPLv3 license.
## Contact
email: astra@astra-toolbox.com
website: https://www.astra-toolbox.com/
Copyright: 2010-2024, imec Vision Lab, University of Antwerp
2014-2024, CWI, Amsterdam
https://visielab.uantwerpen.be/ and https://www.cwi.nl/
astra-toolbox-2.3.0/README.txt 0000664 0000000 0000000 00000015556 14756352071 0016036 0 ustar 00root root 0000000 0000000 -----------------------------------------------------------------------
This file is part of the ASTRA Toolbox
Copyright: 2010-2024, imec Vision Lab, University of Antwerp
2014-2024, CWI, Amsterdam
https://visielab.uantwerpen.be/ and https://www.cwi.nl/
License: Open Source under GPLv3
Contact: astra@astra-toolbox.com
Website: https://www.astra-toolbox.com/
-----------------------------------------------------------------------
The ASTRA Toolbox is a MATLAB and Python toolbox of high-performance GPU
primitives for 2D and 3D tomography.
We support 2D parallel and fan beam geometries, and 3D parallel and cone beam.
All of them have highly flexible source/detector positioning.
A large number of 2D and 3D algorithms are available, including FBP, SIRT,
SART, CGLS.
The basic forward and backward projection operations are GPU-accelerated, and
directly callable from MATLAB and Python to enable building new algorithms.
Documentation / samples:
-------------------------
See the MATLAB and Python code samples in the samples/ directory and on
https://www.astra-toolbox.com/ .
Installation instructions:
---------------------------
Linux/Windows, using conda for Python:
--------------------------------------
Requirements: conda Python environment, with 64 bit Python 3.9-3.13.
We provide packages for the ASTRA Toolbox in the astra-toolbox channel for the
conda package manager. We depend on CUDA packages available from the nvidia
channel. To install ASTRA into the current conda environment, run:
conda install -c astra-toolbox -c nvidia astra-toolbox
We also provide development packages between releases occasionally:
conda install -c astra-toolbox/label/dev -c nvidia astra-toolbox
Linux, using pip for Python packages:
-------------------------------------
Requirements: Python environment with 64 bit Python 3.9-3.13.
pip install astra-toolbox
Note that, unlike conda packages, we only provide packages built for Linux platform, and only with
a single reasonably recent version of CUDA toolkit. These packages depend on PyPI CUDA distribution
provided by NVIDIA.
Windows, binary:
-----------------
Add the mex and tools subdirectories to your MATLAB path, or install the Python
wheel using pip. We require the Microsoft Visual Studio 2017 redistributable
package. If this is not already installed on your system, it is included as
vc_redist.x64.exe in the ASTRA zip file.
Linux, from source:
--------------------
For MATLAB:
Requirements: g++ (7 or higher), CUDA (11.0 or higher), MATLAB (R2012a or higher)
cd build/linux
./autogen.sh # when building a git version
./configure --with-cuda=/usr/local/cuda \
--with-matlab=/usr/local/MATLAB/R2012a \
--prefix=$HOME/astra \
--with-install-type=module
make
make install
Add $HOME/astra/matlab and its subdirectories (tools, mex) to your MATLAB path.
If you want to build the Octave interface instead of the MATLAB interface,
specify --enable-octave instead of --with-matlab=... . The Octave files
will be installed into $HOME/astra/octave . On some Linux distributions
building the Astra Octave interface will require the Octave development package
to be installed (e.g., liboctave-dev on Ubuntu).
NB: Each MATLAB version only supports a specific range of g++ versions.
Despite this, if you have a newer g++ and if you get errors related to missing
GLIBCXX_3.4.xx symbols, it is often possible to work around this requirement
by deleting the version of libstdc++ supplied by MATLAB in
MATLAB_PATH/bin/glnx86 or MATLAB_PATH/bin/glnxa64 (at your own risk),
or setting LD_PRELOAD=/usr/lib64/libstdc++.so.6 (or similar) when starting
MATLAB.
For Python:
Requirements: g++ (7 or higher), CUDA (11.0 or higher), Python (3.x), setuptools, Cython, scipy
cd build/linux
./autogen.sh # when building a git version
./configure --with-cuda=/usr/local/cuda \
--with-python \
--with-install-type=module
make
make install
This will install Astra into your current Python environment.
As a C++ library:
Requirements: g++ (7 or higher), CUDA (11.0 or higher)
cd build/linux
./autogen.sh # when building a git version
./configure --with-cuda=/usr/local/cuda
make
make install-dev
This will install the Astra library and C++ headers.
macOS, from source:
--------------------
Use the Homebrew package manager to install libtool, autoconf, automake.
cd build/linux
./autogen.sh
CPPFLAGS="-I/usr/local/include" NVCCFLAGS="-I/usr/local/include" ./configure \
--with-cuda=/usr/local/cuda \
--with-matlab=/Applications/MATLAB_R2016b.app \
--prefix=$HOME/astra \
--with-install-type=module
make
make install
Windows, from source using Visual Studio 2017:
-----------------------------------------------
Requirements: Visual Studio 2017 (full or community),
CUDA (11.0 or higher), MATLAB (R2012a or higher)
and/or Python 3.x + setuptools + Cython + scipy.
Using the Visual Studio IDE:
* Set the environment variable MATLAB_ROOT to your MATLAB install location.
* Open build\msvc\astra_vc14.sln in Visual Studio.
* Select the appropriate solution configuration (typically Release_CUDA|x64).
* Build the solution.
* Install by copying AstraCuda64.dll and all .mexw64 files from build\msvc\bin\x64\Release_CUDA
and the entire matlab/tools directory to a directory to be added to your MATLAB path.
Using .bat scripts in build\msvc:
* Edit build_env.bat and set up the correct library versions and paths.
* For MATLAB: Run build_MATLAB.bat. The .dll and .mexw64 files will be in bin\x64\Release_Cuda.
* For Python: Run build_python3.bat. Astra will be directly installed into site-packages.
Testing your installation:
---------------------------
To perform a (very) basic test of your ASTRA installation in Python, you can
run the following Python command.
import astra
astra.test()
To test your ASTRA installation in MATLAB, the equivalent command is:
astra_test
References:
------------
If you use the ASTRA Toolbox for your research, we would appreciate it if you would refer to the following papers:
W. Van Aarle, W J. Palenstijn, J. Cant, E. Janssens, F. Bleichrodt, A. Dabravolski, J. De Beenhouwer, K. J. Batenburg, and J. Sijbers, "Fast and Flexible X-ray Tomography Using the ASTRA Toolbox", Optics Express, vol. 24, no. 22, pp. 25129-25147, 2016
W. Van Aarle, W J. Palenstijn, J. De Beenhouwer, T. Altantzis, S. Bals, K. J. Batenburg, and J. Sijbers, "The ASTRA Toolbox: a platform for advanced algorithm development in electron tomography", Ultramicroscopy, vol. 157, pp. 35–47, 2015
Additionally, if you use parallel beam GPU code, we would appreciate it if you would refer to the following paper:
W. J. Palenstijn, K J. Batenburg, and J. Sijbers, "Performance improvements
for iterative electron tomography reconstruction using graphics processing
units (GPUs)", Journal of Structural Biology, vol. 176, issue 2, pp. 250-253,
2011, https://dx.doi.org/10.1016/j.jsb.2011.07.017
astra-toolbox-2.3.0/build/ 0000775 0000000 0000000 00000000000 14756352071 0015423 5 ustar 00root root 0000000 0000000 astra-toolbox-2.3.0/build/conda/ 0000775 0000000 0000000 00000000000 14756352071 0016507 5 ustar 00root root 0000000 0000000 astra-toolbox-2.3.0/build/conda/README.txt 0000664 0000000 0000000 00000001122 14756352071 0020201 0 ustar 00root root 0000000 0000000 Building conda packages:
Linux:
Build container images by running the containers/setup*.sh scripts
./release.sh
Windows:
call C:\tools\miniconda3\condabin\activate.bat
Change to astra-toolbox\build\conda directory
# Build libastra packages, skipping the testing phase
conda build -m libastra\win64_build_config.yaml -c nvidia --no-test libastra
# Build and test astra-toolbox packages
conda build -m astra-toolbox\win64_build_config.yaml -c nvidia astra-toolbox
# Test the previously built libastra packages
conda build -c nvidia --test C:\tools\miniconda3\conda-bld\win-64\libastra*.conda
astra-toolbox-2.3.0/build/conda/astra-toolbox/ 0000775 0000000 0000000 00000000000 14756352071 0021305 5 ustar 00root root 0000000 0000000 astra-toolbox-2.3.0/build/conda/astra-toolbox/bld.bat 0000664 0000000 0000000 00000000377 14756352071 0022545 0 ustar 00root root 0000000 0000000 @echo off
set R=%SRC_DIR%
cd /D %R%
cd python
set CL=/DASTRA_CUDA /DASTRA_PYTHON "/I%R%\include" "/I%R%\lib\include" "/I%CUDA_PATH%\include" /std:c++17
copy "%LIBRARY_LIB%\AstraCuda64.lib" astra.lib
python builder.py build_ext --compiler=msvc install
astra-toolbox-2.3.0/build/conda/astra-toolbox/build.sh 0000664 0000000 0000000 00000000412 14756352071 0022735 0 ustar 00root root 0000000 0000000 #!/bin/sh
case `uname` in
Darwin*)
CC="gcc -stdlib=libstdc++"
;;
esac
cd $SRC_DIR/python/
CPPFLAGS="-DASTRA_CUDA -DASTRA_PYTHON $CPPFLAGS -I$SRC_DIR/ -I$SRC_DIR/include -I$SRC_DIR/lib/include" CC=$CC CFLAGS="-std=c++17" python ./builder.py build install
astra-toolbox-2.3.0/build/conda/astra-toolbox/linux_deb11_build_config.yaml 0000664 0000000 0000000 00000000330 14756352071 0027004 0 ustar 00root root 0000000 0000000 python:
- 3.10
- 3.11
numpy_host:
- ">=2,<3"
- ">=2,<3"
numpy_run:
- ">=1.21,<3"
- ">=1.23,<3"
zip_keys:
- python
- numpy_host
- numpy_run
c_compiler_version:
- 9.3
cxx_compiler_version:
- 9.3
astra-toolbox-2.3.0/build/conda/astra-toolbox/linux_deb12_build_config.yaml 0000664 0000000 0000000 00000000327 14756352071 0027013 0 ustar 00root root 0000000 0000000 python:
- 3.12
- 3.13
numpy_host:
- ">=2,<3"
- ">=2,<3"
numpy_run:
- ">=1.26,<3"
- ">=2,<3"
zip_keys:
- python
- numpy_host
- numpy_run
c_compiler_version:
- 11.2
cxx_compiler_version:
- 11.2
astra-toolbox-2.3.0/build/conda/astra-toolbox/linux_deb9_build_config.yaml 0000664 0000000 0000000 00000000322 14756352071 0026734 0 ustar 00root root 0000000 0000000 python:
- 3.8
- 3.9
numpy_host:
- "1.11"
- "1.16"
numpy_run:
- ">=1.11,<2"
- ">=1.16,<2"
zip_keys:
- python
- numpy_host
- numpy_run
c_compiler_version:
- 7.3
cxx_compiler_version:
- 7.3
astra-toolbox-2.3.0/build/conda/astra-toolbox/meta.yaml 0000664 0000000 0000000 00000002712 14756352071 0023121 0 ustar 00root root 0000000 0000000 package:
name: astra-toolbox
version: '2.3.0'
source:
git_url: https://github.com/astra-toolbox/astra-toolbox.git
git_tag: master
build:
number: 0
test:
imports:
- astra
requires:
# To avoid large downloads just for testing after build phase
- nomkl # [not win]
# import scipy.sparse.linalg fails with mkl-2017.0.4 on Windows
- mkl !=2017.0.4 # [win]
# scipy 1.1.0 packages are broken with python 2.7 and some numpy versions
- scipy !=1.1.0 # [py27]
requirements:
build:
- {{ compiler('c') }} # [win or linux]
- {{ compiler('cxx') }} # [linux]
host:
- python
- cython >=3
- nomkl # [not win]
- numpy {{ numpy_host }}
- scipy
- libastra ==2.3.0
run:
- python
- numpy {{ numpy_run }}
- scipy
# We make this libastra requirement as strict as possible because we
# want to enforce matching astra-toolbox and libastra packages to limit
# chances of API/ABI incompatibility.
# The 'cuda_*' build string is designed to match our packages but not
# current conda-forge/libastra packages which use a different format.
- libastra ==2.3.0 cuda_* # [win or linux]
- libastra ==2.3.0 nocuda_* # [osx]
about:
home: https://www.astra-toolbox.com
license: GPLv3
summary: 'The ASTRA Toolbox is a Python toolbox of high-performance GPU primitives for 2D and 3D tomography.'
# See
# http://docs.continuum.io/conda/build.html for
# more information about meta.yaml
astra-toolbox-2.3.0/build/conda/astra-toolbox/win64_build_config.yaml 0000664 0000000 0000000 00000000411 14756352071 0025640 0 ustar 00root root 0000000 0000000 python:
- 3.9
- 3.10
- 3.11
- 3.12
- 3.13
numpy_host:
- "1.16"
- ">=2,<3"
- ">=2,<3"
- ">=2,<3"
- ">=2,<3"
numpy_run:
- ">=1.16,<2"
- ">=1.21,<3"
- ">=1.23,<3"
- ">=1.26,<3"
- ">=2,<3"
zip_keys:
- python
- numpy_host
- numpy_run
astra-toolbox-2.3.0/build/conda/build.sh 0000775 0000000 0000000 00000003420 14756352071 0020144 0 ustar 00root root 0000000 0000000 #!/bin/sh
set -e
BRANCH=master
URL=https://github.com/astra-toolbox/astra-toolbox
echo "Cloning from ${URL}"
echo " branch: ${BRANCH}"
cd /root
git clone --depth 1 --branch ${BRANCH} ${URL}
echo "Setting conda git_url/git_tag to match:"
perl -pi -e "s~^(\s*git_url:\s*)https://github.com/.+$~\${1}${URL}~" astra-toolbox/build/conda/libastra/meta.yaml astra-toolbox/build/conda/astra-toolbox/meta.yaml
perl -pi -e "s/^(\s*git_tag:\s*).+$/\${1}${BRANCH}/" astra-toolbox/build/conda/libastra/meta.yaml astra-toolbox/build/conda/astra-toolbox/meta.yaml
grep git_ astra-toolbox/build/conda/libastra/meta.yaml
[ $# -eq 0 ] || echo "Setting version-build to $1-$2"
[ $# -eq 0 ] || perl -pi -e "s/^(\s*version:\s*)[0-9a-z+\.']+$/\${1}'$1'/" astra-toolbox/build/conda/libastra/meta.yaml astra-toolbox/build/conda/astra-toolbox/meta.yaml
[ $# -eq 0 ] || perl -pi -e "s/^(\s*number:\s*)[0-9]+$/\${1}$2/" astra-toolbox/build/conda/libastra/meta.yaml astra-toolbox/build/conda/astra-toolbox/meta.yaml
[ $# -eq 0 ] || perl -pi -e "s/^(\s*-\s*libastra\s*==\s*)[0-9a-z+\.]+$/\${1}$1\${2}/" astra-toolbox/build/conda/astra-toolbox/meta.yaml
[ $# -eq 0 ] || perl -pi -e "s/^(\s*-\s*libastra\s*==\s*)[0-9a-z+\.]+(\s+[0-9a-z_+\.\*]+\s+#.*)$/\${1}$1\${2}/" astra-toolbox/build/conda/astra-toolbox/meta.yaml
grep 'version:\|number:' astra-toolbox/build/conda/libastra/meta.yaml
CONF=linux_$3_build_config.yaml
conda build --no-test -c nvidia -m astra-toolbox/build/conda/libastra/${CONF} astra-toolbox/build/conda/libastra
[ x$4 = xfull ] && conda build -c nvidia -m astra-toolbox/build/conda/astra-toolbox/${CONF} astra-toolbox/build/conda/astra-toolbox
[ x$4 = xfull ] && conda build --test -c nvidia /root/miniconda3/conda-bld/linux-64/libastra*tar.bz2
cp /root/miniconda3/conda-bld/linux-64/*astra* /out
astra-toolbox-2.3.0/build/conda/libastra/ 0000775 0000000 0000000 00000000000 14756352071 0020310 5 ustar 00root root 0000000 0000000 astra-toolbox-2.3.0/build/conda/libastra/bld.bat 0000664 0000000 0000000 00000000446 14756352071 0021545 0 ustar 00root root 0000000 0000000 @echo off
set R=%SRC_DIR%
cd /D %R%/build/msvc
python gen.py %cudatoolkit%
msbuild astra_vc14.sln /p:Configuration=Release_CUDA /p:Platform=x64 /t:astra_vc14 /maxcpucount:20
copy bin\x64\Release_CUDA\AstraCuda64.dll "%LIBRARY_BIN%"
copy bin\x64\Release_CUDA\AstraCuda64.lib "%LIBRARY_LIB%"
astra-toolbox-2.3.0/build/conda/libastra/build.sh 0000775 0000000 0000000 00000001736 14756352071 0021755 0 ustar 00root root 0000000 0000000 #!/bin/sh
case `uname` in
Darwin*)
CUDA_ROOT=/usr/local/cuda
CC=gcc
CXX=g++
;;
Linux*)
[ -n "$cudatoolkit" ] || exit 1
CUDA_ROOT=/usr/local/cuda-$cudatoolkit
;;
esac
[ -x "$CUDA_ROOT" ] || echo "CUDA_ROOT=$CUDA_ROOT not found"
[ -x "$CUDA_ROOT" ] || exit 1
cd $SRC_DIR/build/linux
$SRC_DIR/build/linux/autogen.sh
NVCC=$CUDA_ROOT/bin/nvcc
EXTRA_NVCCFLAGS=
$SRC_DIR/build/linux/configure --with-install-type=prefix --with-cuda=$CUDA_ROOT --prefix=$PREFIX NVCCFLAGS="-ccbin $CC -I$PREFIX/include $EXTRA_NVCCFLAGS" CC=$CC CXX=$CXX CPPFLAGS="-I$PREFIX/include"
# Clean, because we may be re-using this source tree when building
# multiple variants of this conda package.
make clean
make -j $CPU_COUNT
make -j $CPU_COUNT install-dev
test -d $CUDA_ROOT/lib64 && LIBPATH="$CUDA_ROOT/lib64" || LIBPATH="$CUDA_ROOT/lib"
case `uname` in
Darwin*)
cp -P $LIBPATH/libcudart.*.dylib $PREFIX/lib
cp -P $LIBPATH/libcufft.*.dylib $PREFIX/lib
;;
esac
astra-toolbox-2.3.0/build/conda/libastra/linux_deb11_build_config.yaml 0000664 0000000 0000000 00000002466 14756352071 0026023 0 ustar 00root root 0000000 0000000 cuda_dep_type:
- monolithic
- monolithic
- monolithic
- monolithic
- monolithic
- modular
- modular
- modular
cudatoolkit:
- 11.1
- 11.2
- 11.3
- 11.4
- 11.5
- 11.6
- 11.7
- 11.8
# Version ranges from the pytorch-cuda libcufft dependency:
# 11.6_1: >=10.7.0.55,<10.7.2.50
# 11.7_5: >=10.7.2.50,<10.9.0.58
# 11.8_5: >=10.9.0.58,<11.0.0.21
libcufft_dep:
- ">=10.3,<10.4"
- ">=10.4,<10.5"
- ">=10.4,<10.5"
- ">=10.5,<10.6"
- ">=10.6,<10.7"
- ">=10.7,<10.9"
- ">=10.7,<10.9"
- ">=10.9,<11.0"
cudacudart_dep:
- ">=11.1,<11.2"
- ">=11.2,<11.3"
- ">=11.3,<11.4"
- ">=11.4,<11.5"
- ">=11.5,<11.6"
- ">=11.6,<11.7"
- ">=11.7,<11.8"
- ">=11.8,<11.9"
pytorchcuda_dep:
- ">=11.1,<11.2"
- ">=11.2,<11.3"
- ">=11.3,<11.4"
- ">=11.4,<11.5"
- ">=11.5,<11.6"
- ">=11.6,<11.7"
- ">=11.7,<11.8"
- ">=11.8,<11.9"
cudatoolkit_dep:
- ">=11.1,<11.1.74"
- ">=11.2,<11.2.72"
- ">=11.3,<11.4"
- ">=11.4,<11.5"
- ">=11.5,<11.6"
- ">=11.6,<11.7"
- ">=11.7,<11.8"
- ">=11.8,<11.9"
c_compiler_version: # [linux or win]
- 9.3 # [linux or win]
cxx_compiler_version: # [linux or win]
- 9.3 # [linux or win]
zip_keys:
- cuda_dep_type
- cudatoolkit
- libcufft_dep
- cudacudart_dep
- pytorchcuda_dep
- cudatoolkit_dep
astra-toolbox-2.3.0/build/conda/libastra/linux_deb12_build_config.yaml 0000664 0000000 0000000 00000002240 14756352071 0026012 0 ustar 00root root 0000000 0000000 cuda_dep_type:
- modular
cudatoolkit:
- 12.0
- 12.1
- 12.2
- 12.3
- 12.4
- 12.5
- 12.6
- 12.8
# Starting at CUDA 12.5, the libcufft packages depend on cuda-version,
# so our dependencies can be more relaxed.
libcufft_dep:
- ">=11.0.0,<11.0.2"
- ">=11.0.2,<11.0.3"
- ">=11.0.8,<11.0.9"
- ">=11.0.11,<11.2.0"
- ">=11.2.0,<11.2.3"
- ">=11.2.3.18"
- ">=11.2.6.28"
- ">=11.3.3.41"
cudacudart_dep:
- ">=12.0,<12.1"
- ">=12.1,<12.2"
- ">=12.2,<12.3"
- ">=12.3,<12.4"
- ">=12.4,<12.5"
- ">=12.5,<12.6"
- ">=12.6,<12.7"
- ">=12.8,<12.9"
pytorchcuda_dep:
- ">=12.0,<12.1"
- ">=12.1,<12.2"
- ">=12.2,<12.3"
- ">=12.3,<12.4"
- ">=12.4,<12.5"
- ">=12.5,<12.6"
- ">=12.6,<12.7"
- ">=12.8,<12.9"
cudatoolkit_dep:
- ">=12.0,<12.1"
- ">=12.1,<12.2"
- ">=12.2,<12.3"
- ">=12.3,<12.4"
- ">=12.4,<12.5"
- ">=12.5,<12.6"
- ">=12.6,<12.7"
- ">=12.8,<12.9"
c_compiler_version: # [linux or win]
- 11.2 # [linux or win]
cxx_compiler_version: # [linux or win]
- 11.2 # [linux or win]
zip_keys:
- cudatoolkit
- libcufft_dep
- cudacudart_dep
- pytorchcuda_dep
- cudatoolkit_dep
astra-toolbox-2.3.0/build/conda/libastra/linux_deb9_build_config.yaml 0000664 0000000 0000000 00000000543 14756352071 0025744 0 ustar 00root root 0000000 0000000 cuda_dep_type:
- monolithic
cudatoolkit:
- 11.0
libcufft_dep:
- ">=10.2,<10.3"
cudacudart_dep:
- ">=11.0,<11.1"
pytorchcuda_dep:
- ">=11.0,<11.1"
cudatoolkit_dep:
- ">=11.0.3,<11.1"
c_compiler_version: # [linux or win]
- 7.3 # [linux or win]
cxx_compiler_version: # [linux or win]
- 7.3 # [linux or win]
astra-toolbox-2.3.0/build/conda/libastra/meta.yaml 0000664 0000000 0000000 00000005137 14756352071 0022130 0 ustar 00root root 0000000 0000000 package:
name: libastra
version: '2.3.0'
source:
git_url: https://github.com/astra-toolbox/astra-toolbox.git
git_tag: master
build:
number: 0
string: cuda_{{ cudatoolkit }}_{{ PKG_BUILDNUM }} # [win or linux]
string: nocuda_{{ PKG_BUILDNUM }} # [osx]
test:
imports:
- astra
requires:
- astra-toolbox
requirements:
build:
- {{ compiler('c') }} # [win or linux]
- {{ compiler('cxx') }} # [linux]
- automake # [osx]
- autoconf # [osx]
- libtool # [osx]
# libgcc-ng/libstdcxx-ng 9.3 introduce extra system requirements on glibc
# For the older systems (debian8, debian9) we use g++ 5.4 and 7.3, resp.
{% if linux and cxx_compiler_version in ['5.4', '7.3'] %}
- libstdcxx-ng <9.3 # [linux]
- libgcc-ng <9.3 # [linux]
- libgomp <9.3 # [linux]
{% endif %}
host:
{% if linux and cxx_compiler_version in ['5.4', '7.3'] %}
- libstdcxx-ng <9.3 # [linux]
- libgcc-ng <9.3 # [linux]
- libgomp <9.3 # [linux]
{% endif %}
{% if cuda_dep_type == 'modular' %}
- cuda-cudart {{ cudacudart_dep }} # [win or linux]
# The cudart dll is (mistakenly?) in the *dev* package in win-64 before cuda-12.5
- cuda-cudart-dev {{ cudacudart_dep }} # [win]
- libcufft {{ libcufft_dep }} # [win or linux]
- libcufft-dev {{ libcufft_dep }} # [win]
{% else %}
# We explicitly specify the cudatoolkit dependency string in
# conda_build_config.yaml , forgoing pin_compatible.
# This is because the cudatoolkit version numbering for 11.0/11.1/11.2 is
# non-chronological on the nvidia conda channel.
- cudatoolkit {{ cudatoolkit_dep }} # [win or linux]
{% endif %}
run:
{% if cuda_dep_type == 'modular' %}
- cuda-cudart {{ cudacudart_dep }} # [win or linux]
- cuda-cudart-dev {{ cudacudart_dep }} # [win]
- libcufft {{ libcufft_dep }} # [win or linux]
- libcufft-dev {{ libcufft_dep }} # [win]
{% else %}
- cudatoolkit {{ cudatoolkit_dep }} # [win or linux]
{% endif %}
run_constrained:
- cuda-version {{ cudatoolkit }} # [win or linux]
- pytorch-cuda {{ pytorchcuda_dep }} # [win or linux]
{% if cuda_dep_type == 'modular' %}
- cudatoolkit {{ cudatoolkit_dep }} # [win or linux]
{% else %}
- cuda-cudart {{ cudacudart_dep }} # [win or linux]
- cuda-cudart-dev {{ cudacudart_dep }} # [win]
- libcufft {{ libcufft_dep }} # [win or linux]
- libcufft-dev {{ libcufft_dep }} # [win]
{% endif %}
about:
home: https://www.astra-toolbox.com
license: GPLv3
summary: 'The ASTRA Toolbox is a Python toolbox of high-performance GPU primitives for 2D and 3D tomography.'
astra-toolbox-2.3.0/build/conda/libastra/win64_build_config.yaml 0000664 0000000 0000000 00000004072 14756352071 0024652 0 ustar 00root root 0000000 0000000 cuda_dep_type:
#- monolithic
#- monolithic
#- monolithic
#- monolithic
- monolithic
#- monolithic
#- monolithic
#- modular
#- modular
- modular
#- modular
- modular
#- modular
#- modular
- modular
#- modular
- modular
cudatoolkit:
#- 10.2
#- 11.0
#- 11.1
#- 11.2
- 11.3
#- 11.4
#- 11.5
#- 11.6
#- 11.7
- 11.8
#- 12.0
- 12.1
#- 12.2
#- 12.3
- 12.4
#- 12.5
- 12.8
# Starting at CUDA 12.5, the libcufft packages depend on cuda-version,
# so our dependencies can be more relaxed.
libcufft_dep:
#- ">=10.1,<10.2"
#- ">=10.2,<10.3"
#- ">=10.3,<10.4"
#- ">=10.4,<10.5"
- ">=10.4,<10.5"
#- ">=10.5,<10.6"
#- ">=10.6,<10.7"
#- ">=10.7,<10.9"
#- ">=10.7,<10.9"
- ">=10.9,<11.0"
#- ">=11.0.0,<11.0.2"
- ">=11.0.2,<11.0.3"
#- ">=11.0.8,<11.0.9"
#- ">=11.0.11,<11.2.0"
- ">=11.2.0,<11.2.3"
#- ">=11.2.3,<11.2.4"
- ">=11.3.3.41"
cudacudart_dep:
#- ">=10.2,<10.3"
#- ">=11.0,<11.1"
#- ">=11.1,<11.2"
#- ">=11.2,<11.3"
- ">=11.3,<11.4"
#- ">=11.4,<11.5"
#- ">=11.5,<11.6"
#- ">=11.6,<11.7"
#- ">=11.7,<11.8"
- ">=11.8,<11.9"
#- ">=12.0,<12.1"
- ">=12.1,<12.2"
#- ">=12.2,<12.3"
#- ">=12.3,<12.4"
- ">=12.4,<12.5"
#- ">=12.5,<12.6"
- ">=12.8,<12.9"
pytorchcuda_dep:
#- ">=10.2,<10.3"
#- ">=11.0,<11.1"
#- ">=11.1,<11.2"
#- ">=11.2,<11.3"
- ">=11.3,<11.4"
#- ">=11.4,<11.5"
#- ">=11.5,<11.6"
#- ">=11.6,<11.7"
#- ">=11.7,<11.8"
- ">=11.8,<11.9"
#- ">=12.0,<12.1"
- ">=12.1,<12.2"
#- ">=12.2,<12.3"
#- ">=12.3,<12.4"
- ">=12.4,<12.5"
#- ">=12.5,<12.6"
- ">=12.8,<12.9"
cudatoolkit_dep:
#- ">=10.2,<10.3"
#- ">=11.0.3,<11.1"
#- ">=11.1,<11.1.74"
#- ">=11.2,<11.2.72"
- ">=11.3,<11.4"
#- ">=11.4,<11.5"
#- ">=11.5,<11.6"
#- ">=11.6,<11.7"
#- ">=11.7,<11.8"
- ">=11.8,<11.9"
#- ">=12.0,<12.1"
- ">=12.1,<12.2"
#- ">=12.2,<12.3"
#- ">=12.3,<12.4"
- ">=12.4,<12.5"
#- ">=12.5,<12.6"
- ">=12.8,<12.9"
zip_keys:
- cuda_dep_type
- cudatoolkit
- libcufft_dep
- cudacudart_dep
- pytorchcuda_dep
- cudatoolkit_dep
astra-toolbox-2.3.0/build/conda/release.sh 0000775 0000000 0000000 00000000577 14756352071 0020477 0 ustar 00root root 0000000 0000000 #!/bin/bash
set -e
D=`mktemp -d`
cp build.sh $D
V=2.3.0
B=0
podman run --rm -v $D:/out:z astra-build-deb9 /bin/bash /out/build.sh $V $B deb9 full
podman run --rm -v $D:/out:z astra-build-deb11 /bin/bash /out/build.sh $V $B deb11 full
podman run --rm -v $D:/out:z astra-build-deb12 /bin/bash /out/build.sh $V $B deb12 full
rm -f $D/build.sh
mkdir -p pkgs
mv $D/* pkgs
rmdir $D
astra-toolbox-2.3.0/build/containers/ 0000775 0000000 0000000 00000000000 14756352071 0017570 5 ustar 00root root 0000000 0000000 astra-toolbox-2.3.0/build/containers/podman/ 0000775 0000000 0000000 00000000000 14756352071 0021046 5 ustar 00root root 0000000 0000000 astra-toolbox-2.3.0/build/containers/podman/setup_debian11.sh 0000664 0000000 0000000 00000001301 14756352071 0024201 0 ustar 00root root 0000000 0000000 #!/bin/bash
set -e
. util.sh
setup_download $MINICONDA $CUDA111 $CUDA112 $CUDA113 $CUDA114 $CUDA115 $CUDA116 $CUDA117 $CUDA118 $CUDA120 $CUDA121 $CUDA122
ctr=$(buildah from debian:11)
setup_base
setup_conda
setup_cuda $CUDA111 $CUDA112 $CUDA113 $CUDA114 $CUDA115 $CUDA116 $CUDA117 $CUDA118
setup_cache_conda cuda-cudart 11.6 11.7 11.8
setup_cache_conda libcufft 10.7.0 10.7.1 10.7.2 10.9.0
setup_cache_conda cudatoolkit 11.3 11.4 11.5 11.6 11.7 11.8
buildah run $ctr conda create -y -n prep -c nvidia --download-only "cudatoolkit=11.1.*,<11.1.74"
buildah run $ctr conda create -y -n prep -c nvidia --download-only "cudatoolkit=11.2.*,<11.2.72"
buildah commit $ctr astra-build-deb11
buildah rm $ctr
astra-toolbox-2.3.0/build/containers/podman/setup_debian12.sh 0000664 0000000 0000000 00000000720 14756352071 0024206 0 ustar 00root root 0000000 0000000 #!/bin/bash
set -e
. util.sh
setup_download $MINICONDA $CUDA120 $CUDA121 $CUDA122 $CUDA123 $CUDA124 $CUDA125 $CUDA126 $CUDA128
ctr=$(buildah from debian:12)
setup_base
setup_conda
setup_cuda $CUDA120 $CUDA121 $CUDA122 $CUDA123 $CUDA124 $CUDA125 $CUDA126 $CUDA128
setup_cache_conda cuda-cudart 12.0 12.1 12.2 12.3 12.4 12.5 12.6 12.8
setup_cache_conda libcufft 11.0.8 11.0.12 11.2.1 11.2.3 11.3.0 11.3.3
buildah commit $ctr astra-build-deb12
buildah rm $ctr
astra-toolbox-2.3.0/build/containers/podman/setup_debian9.sh 0000664 0000000 0000000 00000000424 14756352071 0024135 0 ustar 00root root 0000000 0000000 #!/bin/bash
set -e
. util.sh
setup_download $MINICONDA $CUDA102 $CUDA110
ctr=$(buildah from debian:9)
setup_fixup_debian9
setup_base
setup_conda
setup_cuda $CUDA102 $CUDA110
setup_cache_conda cudatoolkit 10.2 11.0
buildah commit $ctr astra-build-deb9
buildah rm $ctr
astra-toolbox-2.3.0/build/containers/podman/setup_manylinux.sh 0000664 0000000 0000000 00000001070 14756352071 0024644 0 ustar 00root root 0000000 0000000 #!/bin/bash
set -e
. util.sh
setup_download $CUDA121
ctr=$(buildah from quay.io/pypa/manylinux2014_x86_64:latest)
setup_cuda $CUDA121
buildah run $ctr manylinux-interpreters ensure cp39-cp39 cp310-cp310 cp311-cp311 cp312-cp312
setup_pip_install python3.9 setuptools wheel numpy six Cython scipy
setup_pip_install python3.10 setuptools wheel numpy six Cython scipy
setup_pip_install python3.11 setuptools wheel numpy six Cython scipy
setup_pip_install python3.12 setuptools wheel numpy six Cython scipy
buildah commit $ctr astra-build-manylinux
buildah rm $ctr
astra-toolbox-2.3.0/build/containers/podman/util.sh 0000664 0000000 0000000 00000011465 14756352071 0022366 0 ustar 00root root 0000000 0000000 #!/bin/bash
set -e
MINICONDA=https://repo.anaconda.com/miniconda/Miniconda3-py312_24.7.1-0-Linux-x86_64.sh
CUDA102=https://developer.download.nvidia.com/compute/cuda/10.2/Prod/local_installers/cuda_10.2.89_440.33.01_linux.run
CUDA110=https://developer.download.nvidia.com/compute/cuda/11.0.3/local_installers/cuda_11.0.3_450.51.06_linux.run
CUDA111=https://developer.download.nvidia.com/compute/cuda/11.1.1/local_installers/cuda_11.1.1_455.32.00_linux.run
CUDA112=https://developer.download.nvidia.com/compute/cuda/11.2.2/local_installers/cuda_11.2.2_460.32.03_linux.run
CUDA113=https://developer.download.nvidia.com/compute/cuda/11.3.1/local_installers/cuda_11.3.1_465.19.01_linux.run
#CUDA114=https://developer.download.nvidia.com/compute/cuda/11.4.1/local_installers/cuda_11.4.1_470.57.02_linux.run
CUDA114=https://developer.download.nvidia.com/compute/cuda/11.4.4/local_installers/cuda_11.4.4_470.82.01_linux.run
#CUDA115=https://developer.download.nvidia.com/compute/cuda/11.5.1/local_installers/cuda_11.5.1_495.29.05_linux.run
CUDA115=https://developer.download.nvidia.com/compute/cuda/11.5.2/local_installers/cuda_11.5.2_495.29.05_linux.run
#CUDA116=https://developer.download.nvidia.com/compute/cuda/11.6.0/local_installers/cuda_11.6.0_510.39.01_linux.run
CUDA116=https://developer.download.nvidia.com/compute/cuda/11.6.2/local_installers/cuda_11.6.2_510.47.03_linux.run
#CUDA117=https://developer.download.nvidia.com/compute/cuda/11.7.0/local_installers/cuda_11.7.0_515.43.04_linux.run
CUDA117=https://developer.download.nvidia.com/compute/cuda/11.7.1/local_installers/cuda_11.7.1_515.65.01_linux.run
CUDA118=https://developer.download.nvidia.com/compute/cuda/11.8.0/local_installers/cuda_11.8.0_520.61.05_linux.run
CUDA120=https://developer.download.nvidia.com/compute/cuda/12.0.1/local_installers/cuda_12.0.1_525.85.12_linux.run
CUDA121=https://developer.download.nvidia.com/compute/cuda/12.1.1/local_installers/cuda_12.1.1_530.30.02_linux.run
#CUDA122=https://developer.download.nvidia.com/compute/cuda/12.2.0/local_installers/cuda_12.2.0_535.54.03_linux.run
CUDA122=https://developer.download.nvidia.com/compute/cuda/12.2.2/local_installers/cuda_12.2.2_535.104.05_linux.run
CUDA123=https://developer.download.nvidia.com/compute/cuda/12.3.2/local_installers/cuda_12.3.2_545.23.08_linux.run
CUDA124=https://developer.download.nvidia.com/compute/cuda/12.4.1/local_installers/cuda_12.4.1_550.54.15_linux.run
#CUDA125=https://developer.download.nvidia.com/compute/cuda/12.5.0/local_installers/cuda_12.5.0_555.42.02_linux.run
CUDA125=https://developer.download.nvidia.com/compute/cuda/12.5.1/local_installers/cuda_12.5.1_555.42.06_linux.run
#CUDA126=https://developer.download.nvidia.com/compute/cuda/12.6.0/local_installers/cuda_12.6.0_560.28.03_linux.run
#CUDA126=https://developer.download.nvidia.com/compute/cuda/12.6.1/local_installers/cuda_12.6.1_560.35.03_linux.run
#CUDA126=https://developer.download.nvidia.com/compute/cuda/12.6.2/local_installers/cuda_12.6.2_560.35.03_linux.run
CUDA126=https://developer.download.nvidia.com/compute/cuda/12.6.3/local_installers/cuda_12.6.3_560.35.05_linux.run
CUDA128=https://developer.download.nvidia.com/compute/cuda/12.8.0/local_installers/cuda_12.8.0_570.86.10_linux.run
setup_download() {
mkdir -p sw
chcon unconfined_u:object_r:container_file_t:s0 sw || /bin/true
for F in $@; do
[ -f sw/`basename $F` ] || (cd sw; wget $F)
chcon unconfined_u:object_r:container_file_t:s0 sw/`basename $F` || /bin/true
done
}
setup_fixup_debian9() {
buildah run $ctr sed -i 's|deb.debian.org|archive.debian.org|g' /etc/apt/sources.list
buildah run $ctr sed -i 's|security.debian.org|archive.debian.org|g' /etc/apt/sources.list
buildah run $ctr sed -i '/stretch-updates/d' /etc/apt/sources.list
}
setup_base() {
echo Setting up $ctr
buildah config --env DEBIAN_FRONTEND=noninteractive $ctr
buildah run $ctr apt-get update
buildah run $ctr apt-get install -y perl-modules build-essential autoconf libtool automake libboost-dev git libxml2
buildah run $ctr apt-get install -y git-lfs || /bin/true
}
setup_conda() {
echo Installing $(basename $MINICONDA)
buildah run --volume `pwd`/sw:/sw:ro,z $ctr bash /sw/$(basename $MINICONDA) -b
buildah config --env PATH=/root/miniconda3/bin:$(buildah run $ctr printenv PATH) $ctr
buildah run $ctr conda install -y conda-build conda-verify
buildah run $ctr conda config --set solver libmamba
}
setup_cuda() {
for C in $@; do
echo Installing $(basename $C)
buildah run --volume `pwd`/sw:/sw:ro,z $ctr bash /sw/$(basename $C) --toolkit --silent
done
buildah run $ctr rm -f /usr/local/cuda
}
setup_cache_conda() {
N=$1
shift
for C in $@; do
buildah run $ctr conda create -y -n prep -c nvidia --download-only $N=$C
done
}
setup_pip_install() {
PYTHON=$1
shift
buildah run $ctr $PYTHON -m pip install --upgrade pip
buildah run $ctr $PYTHON -m pip install $@
}
astra-toolbox-2.3.0/build/containers/windows/ 0000775 0000000 0000000 00000000000 14756352071 0021262 5 ustar 00root root 0000000 0000000 astra-toolbox-2.3.0/build/containers/windows/provision-boost.ps1 0000664 0000000 0000000 00000000410 14756352071 0025056 0 ustar 00root root 0000000 0000000 #curl.exe -L -o boost.exe https://sourceforge.net/projects/boost/files/boost-binaries/1.78.0/boost_1_78_0-msvc-14.1-64.exe/download
#.\boost.exe /sp- /verysilent /suppressmsgboxes /norestart | more
#del boost.exe
choco install -y boost-msvc-14.1 --version=1.74.0
astra-toolbox-2.3.0/build/containers/windows/provision-buildtools.ps1 0000664 0000000 0000000 00000000656 14756352071 0026124 0 ustar 00root root 0000000 0000000 choco install -y visualstudio2017community
choco install -y visualstudio2017buildtools
choco install -y visualstudio2017-workload-nativedesktop
choco install -y visualstudio2017-workload-python
choco install -y git
choco install -y curl
choco install -y unzip
choco install -y windows-sdk-11-version-22H2-all --version=10.0.22621.2
curl.exe -L -o C:\Users\vagrant\vc_redist.x64.exe https://aka.ms/vs/17/release/vc_redist.x64.exe
astra-toolbox-2.3.0/build/containers/windows/provision-chocolatey.ps1 0000664 0000000 0000000 00000000165 14756352071 0026071 0 ustar 00root root 0000000 0000000 Invoke-Expression ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
astra-toolbox-2.3.0/build/containers/windows/provision-cuda.ps1 0000664 0000000 0000000 00000005124 14756352071 0024653 0 ustar 00root root 0000000 0000000 $c = @(
#'https://developer.download.nvidia.com/compute/cuda/10.2/Prod/local_installers/cuda_10.2.89_441.22_win10.exe'
#'https://developer.download.nvidia.com/compute/cuda/10.2/Prod/patches/1/cuda_10.2.1_win10.exe'
#'https://developer.download.nvidia.com/compute/cuda/10.2/Prod/patches/2/cuda_10.2.2_win10.exe'
#'https://developer.download.nvidia.com/compute/cuda/11.0.3/local_installers/cuda_11.0.3_451.82_win10.exe'
#'https://developer.download.nvidia.com/compute/cuda/11.1.1/local_installers/cuda_11.1.1_456.81_win10.exe'
#'https://developer.download.nvidia.com/compute/cuda/11.2.2/local_installers/cuda_11.2.2_461.33_win10.exe'
'https://developer.download.nvidia.com/compute/cuda/11.3.1/local_installers/cuda_11.3.1_465.89_win10.exe'
#'https://developer.download.nvidia.com/compute/cuda/11.4.4/local_installers/cuda_11.4.4_472.50_windows.exe'
#'https://developer.download.nvidia.com/compute/cuda/11.5.2/local_installers/cuda_11.5.2_496.13_windows.exe'
#'https://developer.download.nvidia.com/compute/cuda/11.6.2/local_installers/cuda_11.6.2_511.65_windows.exe'
#'https://developer.download.nvidia.com/compute/cuda/11.7.1/local_installers/cuda_11.7.1_516.94_windows.exe'
'https://developer.download.nvidia.com/compute/cuda/11.8.0/local_installers/cuda_11.8.0_522.06_windows.exe'
#'https://developer.download.nvidia.com/compute/cuda/12.0.1/local_installers/cuda_12.0.1_528.33_windows.exe'
'https://developer.download.nvidia.com/compute/cuda/12.1.1/local_installers/cuda_12.1.1_531.14_windows.exe'
#'https://developer.download.nvidia.com/compute/cuda/12.2.2/local_installers/cuda_12.2.2_537.13_windows.exe'
#'https://developer.download.nvidia.com/compute/cuda/12.3.2/local_installers/cuda_12.3.2_546.12_windows.exe'
'https://developer.download.nvidia.com/compute/cuda/12.4.1/local_installers/cuda_12.4.1_551.78_windows.exe'
#'https://developer.download.nvidia.com/compute/cuda/12.5.1/local_installers/cuda_12.5.1_555.85_windows.exe'
#'https://developer.download.nvidia.com/compute/cuda/12.6.1/local_installers/cuda_12.6.1_560.94_windows.exe'
#'https://developer.download.nvidia.com/compute/cuda/12.6.2/local_installers/cuda_12.6.2_560.94_windows.exe'
#'https://developer.download.nvidia.com/compute/cuda/12.6.3/local_installers/cuda_12.6.3_561.17_windows.exe'
'https://developer.download.nvidia.com/compute/cuda/12.8.0/local_installers/cuda_12.8.0_571.96_windows.exe'
)
$c | %{
$fn = ([uri] $_).Segments[-1]
$swfn = 'C:\vagrant\sw\' + $fn
if (Test-Path $swfn) {
echo ('Using local ' + $fn)
copy $swfn cuda.exe
} else {
echo ('Downloading ' + $fn)
curl.exe -L -o cuda.exe $_
}
.\cuda.exe -s | more
del cuda.exe
}
astra-toolbox-2.3.0/build/containers/windows/provision-python.ps1 0000664 0000000 0000000 00000000375 14756352071 0025263 0 ustar 00root root 0000000 0000000 choco install -y python3 --version=3.12.2
choco install -y miniconda3
C:\python312\python -m pip install numpy scipy six cython setuptools
C:\tools\miniconda3\shell\condabin\conda-hook.ps1
conda activate base
conda install -y conda-build conda-verify
astra-toolbox-2.3.0/build/linux/ 0000775 0000000 0000000 00000000000 14756352071 0016562 5 ustar 00root root 0000000 0000000 astra-toolbox-2.3.0/build/linux/Makefile.in 0000664 0000000 0000000 00000045612 14756352071 0020637 0 ustar 00root root 0000000 0000000 install_type=@INSTALL_TYPE@
cuda=@HAVECUDA@
matlab=@HAVEMATLAB@
python=@HAVEPYTHON@
boostutf=@HAVEBOOSTUTF@
macos=@IS_MACOS@
MATLAB_ROOT=@MATLAB_ROOT@
octave=@HAVEOCTAVE@
MKDIR=mkdir -p
CXX=@CXX@
LD=@CXX@
SHELL=@SHELL@
INSTALL_SH=$(SHELL) $(srcdir)/install-sh
TARGETS=libastra.la
ifeq ($(matlab),yes)
TARGETS+=mex
endif
ifeq ($(python),yes)
TARGETS+=py
endif
ifeq ($(octave),yes)
TARGETS+=oct
endif
all: $(TARGETS)
prefix=@prefix@
exec_prefix=@exec_prefix@
datarootdir=@datarootdir@
includedir=@includedir@
libdir=@libdir@
srcdir=@srcdir@
abs_top_builddir=@abs_top_builddir@
VPATH=@VPATH_SRCDIR@/../..
CPPFLAGS=@SAVED_CPPFLAGS@
CXXFLAGS=@SAVED_CXXFLAGS@
NVCCFLAGS=@SAVED_NVCCFLAGS@
LDFLAGS=@SAVED_LDFLAGS@
LIBS=@SAVED_LIBS@
CXXFLAGS+=-g -O3 -Wall --std=c++17
LDFLAGS+=-g
CXXFLAGS+=@CXXFLAGS_OS@
LDFLAGS+=@LDFLAGS_OS@
BOOSTUTF_LIBS=@LIBS_BOOSTUTF@
ifeq ($(cuda),yes)
CPPFLAGS += @CPPFLAGS_CUDA@ -DASTRA_CUDA
NVCCFLAGS += @NVCCFLAGS_EXTRA@ @CPPFLAGS_CUDA@ -I$(srcdir)/../../include -DASTRA_CUDA --std c++17
LDFLAGS += @LDFLAGS_CUDA@
LIBS += -lcudart -lcufft
NVCC = @NVCC@
endif
ifeq ($(matlab),yes)
# TODO: Do we also want -fopenmp for octave?
CPPFLAGS+=-I$(MATLAB_ROOT)/extern/include -DMATLAB_MEX_FILE @CPPFLAGS_MATLAB@
ifeq ($(macos),no)
CXXFLAGS+=-fopenmp
LDFLAGS+=-fopenmp
endif
endif
# MODLDFLAGS are the base LDFLAGS for matlab, octave, python modules
MODLDFLAGS=$(LDFLAGS) -L$(abs_top_builddir)/.libs
ifeq ($(install_type),module)
MODLDFLAGS+=-Wl,-rpath,'\$$ORIGIN'
endif
ifeq ($(python),yes)
PYTHON = @PYTHON@
PYINCDIR := $(shell $(PYTHON) -c 'from __future__ import print_function; from distutils.sysconfig import get_python_inc; print(get_python_inc())')
PYLIBDIR := $(shell $(PYTHON) -c 'from __future__ import print_function; from distutils.sysconfig import get_config_var; print(get_config_var("LIBDIR"))')
PYLIBVER = `basename $(PYINCDIR)`
CPPFLAGS += -DASTRA_PYTHON -I$(PYINCDIR)
PYCPPFLAGS := $(CPPFLAGS)
PYCPPFLAGS += -I../include -I../lib/include
PYCXXFLAGS := $(CXXFLAGS)
# copy the current MODLDFLAGS to PYLDFLAGS, and then add flags for matlab/octave
PYLDFLAGS := $(MODLDFLAGS)
MODLDFLAGS += -L$(PYLIBDIR)
MODPYLIBS=-l$(PYLIBVER)
PYBUILDERENV=CXX="${CXX}" CC="${CXX}" CPPFLAGS="${PYCPPFLAGS}" LDFLAGS='${PYLDFLAGS}' CXXFLAGS="${PYCXXFLAGS}" CFLAGS="${PYCXXFLAGS}"
PYBUILDERFLAGS=--astra_build_config_dir $(abs_top_builddir)/python/config --astra_build_cython_dir $(abs_top_builddir)/python/cython
PYBUILDER_BUILD_FLAGS=--build-base=$(abs_top_builddir)/python/build
PYTHON_WHEEL_PLATFORM = @PYTHON_WHEEL_PLATFORM@
endif
# This is below where PYCPPFLAGS copies CPPFLAGS. The python code is built
# from a different directory, so these relative includes would be wrong.
CPPFLAGS+=-I$(srcdir)/../../include -I$(srcdir)/../../lib/include
# Also enable -Wshadow except for the python extensions, since certain cython
# versions generate code with much shadowing.
CXXFLAGS += -Wshadow
ifeq ($(matlab),yes)
MEXFLAGS = @MEXFLAGS@ -cxx
MEXLDFLAGS=\$$LDFLAGS $(MODLDFLAGS)
MEXLIBS = -lut
MEXSUFFIX = @MEXSUFFIX@
MEX = @MEX@
ifeq ($(cuda),yes)
MEXFLAGS += -DASTRA_CUDA
endif
endif
ifeq ($(octave),yes)
OCTLDFLAGS:=$(MODLDFLAGS)
CPPFLAGS += @OCTAVE_CPPFLAGS@
ifeq ($(cuda),yes)
OCTFLAGS=-DASTRA_CUDA
else
OCTFLAGS=
endif
endif
DEPDIR=.deps
BASE_OBJECTS=\
src/Algorithm.lo \
src/ReconstructionAlgorithm2D.lo \
src/ReconstructionAlgorithm3D.lo \
src/ArtAlgorithm.lo \
src/AstraObjectFactory.lo \
src/AstraObjectManager.lo \
src/BackProjectionAlgorithm.lo \
src/CglsAlgorithm.lo \
src/CompositeGeometryManager.lo \
src/ConeProjectionGeometry3D.lo \
src/ConeVecProjectionGeometry3D.lo \
src/Config.lo \
src/Data3D.lo \
src/DataProjector.lo \
src/DataProjectorPolicies.lo \
src/FanFlatBeamLineKernelProjector2D.lo \
src/FanFlatBeamStripKernelProjector2D.lo \
src/FanFlatProjectionGeometry2D.lo \
src/FanFlatVecProjectionGeometry2D.lo \
src/Features.lo \
src/FilteredBackProjectionAlgorithm.lo \
src/Filters.lo \
src/Float32Data.lo \
src/Float32Data2D.lo \
src/Float32ProjectionData2D.lo \
src/Float32VolumeData2D.lo \
src/ForwardProjectionAlgorithm.lo \
src/Fourier.lo \
src/GeometryUtil2D.lo \
src/GeometryUtil3D.lo \
src/Globals.lo \
src/Logging.lo \
src/ParallelBeamBlobKernelProjector2D.lo \
src/ParallelBeamDistanceDrivenProjector2D.lo \
src/ParallelBeamLinearKernelProjector2D.lo \
src/ParallelBeamLineKernelProjector2D.lo \
src/ParallelBeamStripKernelProjector2D.lo \
src/ParallelProjectionGeometry2D.lo \
src/ParallelVecProjectionGeometry2D.lo \
src/ParallelProjectionGeometry3D.lo \
src/ParallelVecProjectionGeometry3D.lo \
src/PlatformDepSystemCode.lo \
src/PluginAlgorithmFactory.lo \
src/ProjectionGeometry2D.lo \
src/ProjectionGeometry2DFactory.lo \
src/ProjectionGeometry3D.lo \
src/ProjectionGeometry3DFactory.lo \
src/Projector2D.lo \
src/Projector3D.lo \
src/SartAlgorithm.lo \
src/SheppLogan.lo \
src/SirtAlgorithm.lo \
src/SparseMatrixProjectionGeometry2D.lo \
src/SparseMatrixProjector2D.lo \
src/SparseMatrix.lo \
src/Utilities.lo \
src/VolumeGeometry2D.lo \
src/VolumeGeometry3D.lo \
src/XMLConfig.lo \
src/XMLDocument.lo \
src/XMLNode.lo
CUDA_CXX_OBJECTS=\
src/CudaProjector2D.lo \
src/CudaProjector3D.lo \
src/CudaReconstructionAlgorithm2D.lo \
src/CudaBackProjectionAlgorithm.lo \
src/CudaDartMaskAlgorithm.lo \
src/CudaDartMaskAlgorithm3D.lo \
src/CudaDataOperationAlgorithm.lo \
src/CudaRoiSelectAlgorithm.lo \
src/CudaDartSmoothingAlgorithm.lo \
src/CudaDartSmoothingAlgorithm3D.lo \
src/CudaFilteredBackProjectionAlgorithm.lo \
src/CudaForwardProjectionAlgorithm.lo \
src/CudaSartAlgorithm.lo \
src/CudaSirtAlgorithm.lo \
src/CudaCglsAlgorithm.lo \
src/CudaCglsAlgorithm3D.lo \
src/CudaEMAlgorithm.lo \
src/CudaFDKAlgorithm3D.lo \
src/CudaSirtAlgorithm3D.lo \
src/CudaBackProjectionAlgorithm3D.lo \
src/CudaForwardProjectionAlgorithm3D.lo
CUDA_OBJECTS=\
cuda/2d/algo.lo \
cuda/2d/par_fp.lo \
cuda/2d/par_bp.lo \
cuda/2d/fan_fp.lo \
cuda/2d/fan_bp.lo \
cuda/2d/fbp.lo \
cuda/2d/sirt.lo \
cuda/2d/sart.lo \
cuda/2d/cgls.lo \
cuda/2d/em.lo \
cuda/2d/astra.lo \
cuda/2d/util.lo \
cuda/2d/arith.lo \
cuda/2d/fft.lo \
cuda/2d/darthelper.lo \
cuda/3d/darthelper3d.lo \
cuda/3d/algo3d.lo \
cuda/3d/cgls3d.lo \
cuda/3d/cone_fp.lo \
cuda/3d/cone_bp.lo \
cuda/3d/fdk.lo \
cuda/3d/par3d_fp.lo \
cuda/3d/par3d_bp.lo \
cuda/3d/sirt3d.lo \
cuda/3d/astra3d.lo \
cuda/3d/util3d.lo \
cuda/3d/arith3d.lo \
cuda/3d/mem3d.lo
ALL_OBJECTS=$(BASE_OBJECTS)
ifeq ($(cuda),yes)
ALL_OBJECTS+=$(CUDA_CXX_OBJECTS) $(CUDA_OBJECTS)
endif
TEST_OBJECTS=\
tests/main.o \
tests/test_AstraObjectManager.o \
tests/test_Float32Data2D.o \
tests/test_VolumeGeometry2D.o \
tests/test_ParallelProjectionGeometry2D.o \
tests/test_FanFlatProjectionGeometry2D.o \
tests/test_Float32VolumeData2D.o \
tests/test_Float32ProjectionData2D.o \
tests/test_Fourier.o \
tests/test_XMLDocument.o
MATLAB_CXX_OBJECTS=\
matlab/mex/mexHelpFunctions.o \
matlab/mex/mexCopyDataHelpFunctions.o \
matlab/mex/mexInitFunctions.o \
matlab/mex/mexDataManagerHelpFunctions.o
MATLAB_MEX=\
matlab/mex/astra_mex_algorithm_c.$(MEXSUFFIX) \
matlab/mex/astra_mex_data2d_c.$(MEXSUFFIX) \
matlab/mex/astra_mex_c.$(MEXSUFFIX) \
matlab/mex/astra_mex_matrix_c.$(MEXSUFFIX) \
matlab/mex/astra_mex_projector_c.$(MEXSUFFIX) \
matlab/mex/astra_mex_projector3d_c.$(MEXSUFFIX) \
matlab/mex/astra_mex_log_c.$(MEXSUFFIX) \
matlab/mex/astra_mex_data3d_c.$(MEXSUFFIX) \
matlab/mex/astra_mex_direct_c.$(MEXSUFFIX)
OCTAVE_CXX_OBJECTS=\
matlab/mex/octave_support.o
OCTAVE_MEX=\
matlab/mex/astra_mex_algorithm_c.mex \
matlab/mex/astra_mex_data2d_c.mex \
matlab/mex/astra_mex_c.mex \
matlab/mex/astra_mex_matrix_c.mex \
matlab/mex/astra_mex_projector_c.mex \
matlab/mex/astra_mex_projector3d_c.mex \
matlab/mex/astra_mex_log_c.mex \
matlab/mex/astra_mex_data3d_c.mex \
matlab/mex/astra_mex_direct_c.mex
ifeq ($(python),yes)
MATLAB_MEX+=matlab/mex/astra_mex_plugin_c.$(MEXSUFFIX)
OCTAVE_MEX+=matlab/mex/astra_mex_plugin_c.mex
endif
OBJECT_DIRS = src/ tests/ cuda/2d/ cuda/3d/ matlab/mex/ ./
DEPDIRS = $(addsuffix $(DEPDIR),$(OBJECT_DIRS))
-include $(wildcard $(addsuffix /*.d,$(DEPDIRS)))
LIBDIRS = $(addsuffix .libs,./ src/ cuda/2d/ cuda/3d/)
SONAME=$(shell . ${abs_top_builddir}/libastra.la; echo $$dlname)
ifeq ($(matlab),yes)
mex: $(MATLAB_MEX)
%.$(MEXSUFFIX): %.o $(MATLAB_CXX_OBJECTS) libastra.la
$(MEX) LDFLAGS="$(MEXLDFLAGS)" $(MEXFLAGS) $(LIBS) $(MEXLIBS) -lastra -output $* $*.o $(MATLAB_CXX_OBJECTS)
ifeq ($(install_type),module)
ifeq ($(macos),yes)
@# tell macOS dynamic loader to look in mex directory for libastra.0.dylib
@# CHECKME: some versions of otool return a two-line output for otool -DX?
@# (xcode 8.2.1 / macos 10.11.6 ?)
install_name_tool -change `otool -DX .libs/$(SONAME) | tail -n 1` @loader_path/$(SONAME) $@
endif
endif
ifeq ($(python),yes)
matlab/mex/astra_mex_plugin_c.$(MEXSUFFIX): matlab/mex/astra_mex_plugin_c.o $(MATLAB_CXX_OBJECTS) libastra.la
$(MEX) LDFLAGS="$(MEXLDFLAGS)" $(MEXFLAGS) $(LIBS) $(MEXLIBS) $(MODPYLIBS) -lastra -output matlab/mex/astra_mex_plugin_c $< $(MATLAB_CXX_OBJECTS)
endif
endif
ifeq ($(python),yes)
py: libastra.la
$(MKDIR) python/build
$(MKDIR) python/config
# Note: setting CC to CXX is intentional. Python uses CC for compilation even if input is C++.
cd $(srcdir)/../../python; $(PYBUILDERENV) \
$(PYTHON) builder.py $(PYBUILDERFLAGS) \
build $(PYBUILDER_BUILD_FLAGS) \
$(patsubst %,add_extra_lib --file=%,$(PYPKGDATA))
endif
ifeq ($(octave),yes)
oct: $(OCTAVE_MEX)
%.mex: %.o $(MATLAB_CXX_OBJECTS) $(OCTAVE_CXX_OBJECTS) libastra.la
mkoctfile --mex $(OCTFLAGS) $(OCTLDFLAGS) $(LIBS) -lastra --output $* $*.o $(MATLAB_CXX_OBJECTS) $(OCTAVE_CXX_OBJECTS)
ifeq ($(python),yes)
matlab/mex/astra_mex_plugin_c.mex: matlab/mex/astra_mex_plugin_c.o $(MATLAB_CXX_OBJECTS) $(OCTAVE_CXX_OBJECTS) libastra.la
mkoctfile --mex $(OCTFLAGS) $(OCTLDFLAGS) $(LIBS) $(MODPYLIBS) -lastra --output matlab/mex/astra_mex_plugin_c $< $(MATLAB_CXX_OBJECTS) $(OCTAVE_CXX_OBJECTS)
endif
endif
libastra.la: $(ALL_OBJECTS)
./libtool --mode=link --tag=CXX $(LD) -rpath $(libdir) -o $@ $(LDFLAGS) $(LIBS) $+
%.o: %.cpp
$(MKDIR) $(*D)/$(DEPDIR)
$(CXX) -Wp,-MMD,"$(*D)/$(DEPDIR)/$(*F).d",-MQ,"$@",-MP $(CXXFLAGS) -fPIC -DPIC $(CPPFLAGS) -c $(<) -o $*.o
%.lo: %.cpp
$(MKDIR) $(*D)/$(DEPDIR)
./libtool --mode=compile --tag=CXX $(CXX) -Wp,-MMD,"$(*D)/$(DEPDIR)/$(*F).d",-MQ,"$@",-MP $(CXXFLAGS) $(CPPFLAGS) -c $(<) -o $*.o
gen_static_libs := `./libtool --features | grep -q 'disable static' && echo no || echo yes`
ifeq ($(cuda),yes)
%.lo: %.cu
@# Behave like libtool: compile both a PIC and a non-PIC object file
@$(MKDIR) $(*D)
@$(MKDIR) $(*D)/.libs
@$(MKDIR) $(*D)/$(DEPDIR)
$(NVCC) $(NVCCFLAGS) -c $(<) -Xcompiler -fPIC -DPIC -o $(*D)/.libs/$(*F).o
ifeq ($(gen_static_libs),yes)
@$(NVCC) $(NVCCFLAGS) -c $(<) -o $*.o >/dev/null 2>&1
endif
@# Generate a .d file, and change the target name in it from .o to .lo
@# CUDA 5.5's nvcc doesn't have the -MT option we would like to use.
@$(NVCC) $(NVCCFLAGS) -M $(<) -odir $(*D) -o $(*D)/$(DEPDIR)/$(*F).d2
@sed '1s/\.o :/.lo :/' < $(*D)/$(DEPDIR)/$(*F).d2 > $(*D)/$(DEPDIR)/$(*F).d
@rm -f $(*D)/$(DEPDIR)/$(*F).d2
@# Generate empty targets for all dependencies listed in the .d file.
@# This mimics gcc's -MP option.
@for x in `cat $(*D)/$(DEPDIR)/$(*F).d`; do if test a$$x != a: -a a$$x != a\\; then (echo; echo "$$x:") >> $(*D)/$(DEPDIR)/$(*F).d; fi; done
@# Generate a fake libtool .lo file
@echo "# $*.lo - a libtool object file" > $*.lo
@echo "# Generated by" `./libtool --version | head -n 1` >> $*.lo
@echo "#" >> $*.lo
@echo "# Please DO NOT delete this file!" >> $*.lo
@echo "# It is necessary for linking the library." >> $*.lo
@echo >> $*.lo
@echo "# Name of the PIC object." >> $*.lo
@echo "pic_object='.libs/$(*F).o'" >> $*.lo
@echo >> $*.lo
@echo "# Name of the non-PIC object." >> $*.lo
ifeq ($(gen_static_libs),yes)
@echo "non_pic_object='$(*F).o'" >> $*.lo
else
@echo "non_pic_object=none" >> $*.lo
endif
@# Remove generated .linkinfo file
@rm -f $(*F).linkinfo
endif
ifeq ($(boostutf),yes)
test.bin: $(ALL_OBJECTS) $(TEST_OBJECTS)
./libtool --mode=link $(LD) -o $@ $(LDFLAGS) $+ $(LIBS) $(BOOSTUTF_LIBS)
test: test.bin
./test.bin
else
test:
@echo "Tests have been disabled by configure"
endif
clean:
rm -f $(MATLAB_MEX) libastra.la
rm -f $(addsuffix /*.lo,$(OBJECT_DIRS))
rm -f $(addsuffix /*.o,$(OBJECT_DIRS))
rm -f $(addsuffix /*.d,$(DEPDIRS))
rm -f $(addsuffix /*,$(LIBDIRS))
rm -f $(TEST_OBJECTS) test.bin
rm -fr python/
distclean: clean
rm -f $(srcdir)/config.guess $(srcdir)/config.sub $(srcdir)/ltmain.sh libtool $(srcdir)/install-sh
rm -f config.log config.status
rm -f $(srcdir)/aclocal.m4
rm -rf $(srcdir)/autom4te.cache
rm -f $(srcdir)/configure Makefile
install-libraries: libastra.la
$(INSTALL_SH) -m 755 -d $(DESTDIR)$(libdir)
./libtool --mode=install $(INSTALL_SH) -m 644 libastra.la $(DESTDIR)$(libdir)
./libtool --mode=finish $(DESTDIR)$(libdir)
# ------------------------
# INSTALLATION
# ------------------------
ifeq ($(install_type),prefix)
# libraries into @libdir@, python into site-packages, mex into @datadir@
install: install-libraries install-matlab install-python-site-packages install-octave
PYPKGDATA=
MATLABBASE=@datadir@/astra/matlab
OCTAVEBASE=@datadir@/astra/octave
endif
ifeq ($(install_type),dir)
# everything into @prefix@
install: install-libraries install-matlab install-python install-octave
PYPKGDATA=
MATLABBASE=@prefix@/matlab
OCTAVEBASE=@prefix@/octave
PYTHONBASE=@prefix@/python
endif
ifeq ($(install_type),module)
# python into site-packages, mex into @datadir@
# library copied into python/mex directories
# modules built with rpath=$ORIGIN
install: install-matlab install-python-site-packages install-octave
PYPKGDATA=$(abs_top_builddir)/.libs/$(SONAME)
MATLABBASE=@prefix@/matlab
OCTAVEBASE=@prefix@/octave
install-matlab-so: libastra.la
$(INSTALL_SH) -m 755 -d $(DESTDIR)$(MATLABBASE)/mex
$(INSTALL_SH) -m 755 $(abs_top_builddir)/.libs/$(SONAME) $(DESTDIR)$(MATLABBASE)/mex
install-octave-so: libastra.la
$(INSTALL_SH) -m 755 -d $(DESTDIR)$(OCTAVEBASE)/mex
$(INSTALL_SH) -m 755 $(abs_top_builddir)/.libs/$(SONAME) $(DESTDIR)$(OCTAVEBASE)/mex
else
install-matlab-so:
install-octave-so:
endif
ifeq ($(python),yes)
install-python: py
# Note: setting CC to CXX is intentional. Python uses CC for compilation even if input is C++.
cd $(srcdir)/../../python; $(PYBUILDERENV) \
$(PYTHON) builder.py $(PYBUILDERFLAGS) \
set_dist_dir --dist-dir=$(abs_top_builddir)/python/dist \
build $(PYBUILDER_BUILD_FLAGS) \
egg_info --egg-base=$(abs_top_builddir)/python \
$(patsubst %,add_extra_lib --file=%,$(PYPKGDATA)) \
install $(patsubst %,--root=%,$(DESTDIR)) --install-base=@prefix@/python --install-headers=@prefix@/python --install-purelib=@prefix@/python --install-platlib=@prefix@/python --install-scripts=@prefix@/python --install-data=@prefix@/python --old-and-unmanageable --no-compile
# TODO: docs
install-python-site-packages: py
# Note: setting CC to CXX is intentional. Python uses CC for compilation even if input is C++.
cd $(srcdir)/../../python; $(PYBUILDERENV) \
$(PYTHON) builder.py $(PYBUILDERFLAGS) \
set_dist_dir --dist-dir=$(abs_top_builddir)/python/dist \
build $(PYBUILDER_BUILD_FLAGS) \
egg_info --egg-base=$(abs_top_builddir)/python \
$(patsubst %,add_extra_lib --file=%,$(PYPKGDATA)) \
install $(patsubst %,--root=% --single-version-externally-managed,$(DESTDIR))
python-wheel: py
# Note: setting CC to CXX is intentional. Python uses CC for compilation even if input is C++.
cd $(srcdir)/../../python; $(PYBUILDERENV) \
$(PYTHON) builder.py $(PYBUILDERFLAGS) --astra_cuda_dependencies \
set_dist_dir --dist-dir=$(abs_top_builddir)/python/dist \
build $(PYBUILDER_BUILD_FLAGS) \
egg_info --egg-base=$(abs_top_builddir)/python \
$(patsubst %,add_extra_lib --file=%,$(PYPKGDATA)) \
bdist_wheel $(patsubst %,--plat-name %,$(PYTHON_WHEEL_PLATFORM))
else
install-python-site-packages:
install-python:
endif
ifeq ($(matlab),yes)
install-matlab: $(MATLAB_MEX) install-matlab-so
$(INSTALL_SH) -m 755 -d $(DESTDIR)$(MATLABBASE)
$(INSTALL_SH) -m 755 -d $(DESTDIR)$(MATLABBASE)/mex
$(INSTALL_SH) -m 755 -d $(DESTDIR)$(MATLABBASE)/tools
$(INSTALL_SH) -m 755 -d $(DESTDIR)$(MATLABBASE)/algorithms
$(INSTALL_SH) -m 755 $(MATLAB_MEX) $(DESTDIR)$(MATLABBASE)/mex
$(INSTALL_SH) -m 644 $(srcdir)/../../matlab/tools/*.m $(DESTDIR)$(MATLABBASE)/tools
for D in DART DART/tools DART/examples plot_geom plot_geom/private plot_geom/+draw plot_geom/+draw/private plot_geom/+parseargs plot_geom/+stlTools; do \
$(INSTALL_SH) -m 755 -d $(DESTDIR)$(MATLABBASE)/algorithms/$$D; \
$(INSTALL_SH) -m 644 $(srcdir)/../../matlab/algorithms/$$D/*.m $(DESTDIR)$(MATLABBASE)/algorithms/$$D; \
done
# TODO: docs
else
install-matlab:
endif
ifeq ($(octave),yes)
install-octave: $(OCTAVE_MEX) install-octave-so
$(INSTALL_SH) -m 755 -d $(DESTDIR)$(OCTAVEBASE)
$(INSTALL_SH) -m 755 -d $(DESTDIR)$(OCTAVEBASE)/mex
$(INSTALL_SH) -m 755 -d $(DESTDIR)$(OCTAVEBASE)/tools
$(INSTALL_SH) -m 755 $(OCTAVE_MEX) $(DESTDIR)$(OCTAVEBASE)/mex
$(INSTALL_SH) -m 644 $(srcdir)/../../matlab/tools/*.m $(DESTDIR)$(OCTAVEBASE)/tools
# TODO: docs
else
install-octave:
endif
ifeq ($(install_type),module)
install-dev:
@echo "install-dev is not compatible with the 'module' install type."
@echo "Please use 'prefix' or 'dir' instead."
install-headers:
@echo "install-headers is not compatible with the 'module' install type."
@echo "Please use 'prefix' or 'dir' instead."
else
install-headers:
$(INSTALL_SH) -m 755 -d $(DESTDIR)$(includedir)
$(INSTALL_SH) -m 755 -d $(DESTDIR)$(includedir)/astra
$(INSTALL_SH) -m 755 -d $(DESTDIR)$(includedir)/astra/cuda
$(INSTALL_SH) -m 755 -d $(DESTDIR)$(includedir)/astra/cuda/2d
$(INSTALL_SH) -m 755 -d $(DESTDIR)$(includedir)/astra/cuda/3d
$(INSTALL_SH) -m 644 $(srcdir)/../../include/astra/*.h $(DESTDIR)$(includedir)/astra
$(INSTALL_SH) -m 644 $(srcdir)/../../include/astra/*.inl $(DESTDIR)$(includedir)/astra
$(INSTALL_SH) -m 644 $(srcdir)/../../include/astra/cuda/2d/*.h $(DESTDIR)$(includedir)/astra/cuda/2d
$(INSTALL_SH) -m 644 $(srcdir)/../../include/astra/cuda/3d/*.h $(DESTDIR)$(includedir)/astra/cuda/3d
install-dev: install-libraries install-headers libastra.pc
$(INSTALL_SH) -m 755 -d $(DESTDIR)$(libdir)
$(INSTALL_SH) -m 755 -d $(DESTDIR)$(libdir)/pkgconfig/
$(INSTALL_SH) -m 644 libastra.pc $(DESTDIR)$(libdir)/pkgconfig/
endif
Makefile libastra.pc: %: $(srcdir)/%.in config.status
CONFIG_HEADERS= CONFIG_LINKS= CONFIG_FILES=$@ $(SHELL) ./config.status
config.status: $(srcdir)/configure
@echo "configure script has changed. Re-running it with last parameters"
$(SHELL) ./config.status --recheck
$(srcdir)/configure: $(srcdir)/configure.ac
@echo "configure.ac has been changed. Regenerating configure script"
cd $(srcdir) && $(SHELL) ./autogen.sh
.PHONY: all mex test clean distclean install install-libraries py install-python-site-packages install-python install-matlab install-octave install-matlab-so install-octave-so install-headers install-dev python-wheel
# don't remove intermediate files:
.SECONDARY:
# disable all implicit built-in rules
.SUFFIXES:
astra-toolbox-2.3.0/build/linux/README.txt 0000664 0000000 0000000 00000001544 14756352071 0020264 0 ustar 00root root 0000000 0000000 Requirements: g++, boost, CUDA (driver+toolkit), Matlab and/or Python (2.7 or 3.x)
cd build/linux
./autogen.sh # when building a git version
./configure --with-cuda=/usr/local/cuda \
--with-matlab=/usr/local/MATLAB/R2012a \
--with-python \
--prefix=/usr/local/astra
make
make install
Add /usr/local/astra/lib to your LD_LIBRARY_PATH.
Add /usr/local/astra/matlab and its subdirectories (tools, mex)
to your matlab path.
Add /usr/local/astra/python to your PYTHONPATH.
NB: Each matlab version only supports a specific range of g++ versions.
Despite this, if you have a newer g++ and if you get errors related to missing
GLIBCXX_3.4.xx symbols, it is often possible to work around this requirement
by deleting the version of libstdc++ supplied by matlab in
MATLAB_PATH/bin/glnx86 or MATLAB_PATH/bin/glnxa64 (at your own risk).
astra-toolbox-2.3.0/build/linux/acinclude.m4 0000664 0000000 0000000 00000010610 14756352071 0020751 0 ustar 00root root 0000000 0000000 AC_DEFUN([ASTRA_CHECK_BOOST_UNIT_TEST_FRAMEWORK],[
BOOST_BACKUP_LIBS="$LIBS"
LIBS="$LIBS $1"
AC_LINK_IFELSE([AC_LANG_SOURCE([
#define BOOST_TEST_DYN_LINK
#define BOOST_AUTO_TEST_MAIN
#include
#include
#include
])],[$2],[$3])
LIBS="$BOOST_BACKUP_LIBS"
unset BOOST_BACKUP_LIBS
])
dnl ASTRA_CHECK_MEX_SUFFIX(list-of-suffices, variable-to-set)
AC_DEFUN([ASTRA_CHECK_MEX_SUFFIX],[
cat >conftest.cc <<_ACEOF
extern "C" void mexFunction() {
}
_ACEOF
$CXX -fPIC -c -o conftest.o conftest.cc
ASTRA_RUN_LOGOUTPUT([$MEX -cxx -output conftest conftest.o])
for suffix in $1; do
if test -f "conftest.$suffix"; then
$2="$suffix"
rm -f "conftest.$suffix"
fi
done
rm -f conftest.cc conftest.o
])
dnl ASTRA_CHECK_MEX_OPTION(option, mex-suffix, action-if-supported, action-if-not-supported)
dnl Check if an option is supported by mex.
dnl We test if mex works by testing if it produces a mex file as output;
dnl this is required since 'mex' is also a commonly installed LaTeX format
AC_DEFUN([ASTRA_CHECK_MEX_OPTION],[
cat >conftest.cc <<_ACEOF
extern "C" void mexFunction() {
}
_ACEOF
$CXX -fPIC -c -o conftest.o conftest.cc
ASTRA_RUN_LOGOUTPUT([$MEX $1 -cxx -output conftest conftest.o])
AS_IF([test -f "conftest.$2"],[
rm -f "conftest.$2"
$3],[$4])
rm -f conftest.cc conftest.o
])
dnl ASTRA_RUN_STOREOUTPUT(command, output)
AC_DEFUN([ASTRA_RUN_STOREOUTPUT],[{
AS_ECHO(["$as_me:${as_lineno-$LINENO}: $1"]) >&AS_MESSAGE_LOG_FD
( $1 ) >$2 2>&1
ac_status=$?
cat $2 >&AS_MESSAGE_LOG_FD
AS_ECHO(["$as_me:${as_lineno-$LINENO}: \$? = $ac_status"]) >&AS_MESSAGE_LOG_FD
test $ac_status = 0;
}])
dnl ASTRA_RUN_LOGOUTPUT(command)
AC_DEFUN([ASTRA_RUN_LOGOUTPUT],[{
AS_ECHO(["$as_me:${as_lineno-$LINENO}: $1"]) >&AS_MESSAGE_LOG_FD
( $1 ) >&AS_MESSAGE_LOG_FD 2>&1
ac_status=$?
AS_ECHO(["$as_me:${as_lineno-$LINENO}: \$? = $ac_status"]) >&AS_MESSAGE_LOG_FD
test $ac_status = 0;
}])
dnl ASTRA_TRY_PYTHON(code, action-if-ok, action-if-not-ok)
AC_DEFUN([ASTRA_TRY_PYTHON],[
cat >conftest.py <<_ACEOF
$1
_ACEOF
ASTRA_RUN_LOGOUTPUT($PYTHON conftest.py)
AS_IF([test $? = 0],[$2],[
AS_ECHO(["$as_me: failed program was:"]) >&AS_MESSAGE_LOG_FD
sed 's/^/| /' conftest.py >&AS_MESSAGE_LOG_FD
$3])
])
dnl ASTRA_CHECK_NVCC(variable-to-set,cppflags-to-set)
AC_DEFUN([ASTRA_CHECK_NVCC],[
cat >conftest.cu <<_ACEOF
#include
int main() {
std::cout << "Test" << std::endl;
return 0;
}
_ACEOF
$1="yes"
ASTRA_RUN_STOREOUTPUT([$NVCC -c -o conftest.o conftest.cu $NVCCFLAGS $$2],conftest.nvcc.out) || {
$1="no"
# Check if hack for gcc 4.4 helps
if grep -q __builtin_stdarg_start conftest.nvcc.out; then
AS_ECHO(["$as_me:${as_lineno-$LINENO}: Trying CUDA hack for gcc 4.4"]) >&AS_MESSAGE_LOG_FD
NVCC_OPT="-Xcompiler -D__builtin_stdarg_start=__builtin_va_start"
ASTRA_RUN_LOGOUTPUT([$NVCC -c -o conftest.o conftest.cu $NVCCFLAGS $$2 $NVCC_OPT]) && {
$1="yes"
$2="$$2 $NVCC_OPT"
}
fi
}
if test x$$1 = xno; then
AS_ECHO(["$as_me: failed program was:"]) >&AS_MESSAGE_LOG_FD
sed 's/^/| /' conftest.cu >&AS_MESSAGE_LOG_FD
fi
rm -f conftest.cu conftest.o conftest.nvcc.out
])
dnl ASTRA_FIND_NVCC_ARCHS(archs-to-try,cppflags-to-extend,output-list)
dnl Architectures should be of the form 10,20,30,35,
dnl and should be in order. The last accepted one will be used for PTX output.
dnl All accepted ones will be used for cubin output.
AC_DEFUN([ASTRA_FIND_NVCC_ARCHS],[
cat >conftest.cu <<_ACEOF
#include
int main() {
std::cout << "Test" << std::endl;
return 0;
}
_ACEOF
NVCC_extra=""
# Add -Wno-deprecated-gpu-targets option if supported
ASTRA_RUN_LOGOUTPUT([$NVCC -c -o conftest.o conftest.cu -Wno-deprecated-gpu-targets $NVCCFLAGS $$2]) && {
NVCC_extra="-Wno-deprecated-gpu-targets"
}
NVCC_lastarch="none"
NVCC_list=""
astra_save_IFS=$IFS
IFS=,
for arch in $1; do
IFS=$astra_save_IFS
NVCC_opt="-gencode=arch=compute_$arch,code=sm_$arch"
$NVCC -c -o conftest.o conftest.cu $NVCCFLAGS $$2 $NVCC_opt >conftest.nvcc.out 2>&1 && {
NVCC_lastarch=$arch
NVCC_extra="$NVCC_extra $NVCC_opt"
NVCC_list="${NVCC_list:+$NVCC_list, }$arch"
}
done
IFS=$astra_save_IFS
if test $NVCC_lastarch != none; then
NVCC_extra="$NVCC_extra -gencode=arch=compute_${NVCC_lastarch},code=compute_${NVCC_lastarch}"
$3="$NVCC_list"
$2="$$2 $NVCC_extra"
else
$3="none"
fi
rm -f conftest.cu conftest.o conftest.nvcc.out
])
astra-toolbox-2.3.0/build/linux/autogen.sh 0000775 0000000 0000000 00000001362 14756352071 0020565 0 ustar 00root root 0000000 0000000 #!/usr/bin/env bash
aclocal
if test $? -ne 0; then
echo "Error running aclocal"
exit 1
fi
autoconf
if test $? -ne 0; then
echo "Error running autoconf"
exit 1
fi
case `uname` in
Darwin*)
test -x "`which glibtoolize 2>/dev/null`" && LIBTOOLIZEBIN=glibtoolize || LIBTOOLIZEBIN=libtoolize ;;
*)
LIBTOOLIZEBIN=libtoolize ;; esac
$LIBTOOLIZEBIN --install --force > /dev/null 2>&1
if test $? -ne 0; then
$LIBTOOLIZEBIN --force
if test $? -ne 0; then
echo "Error running libtoolize"
exit 1
fi
fi
if test ! -e config.guess; then
ln -s config.guess.dist config.guess
fi
if test ! -e config.sub; then
ln -s config.sub.dist config.sub
fi
if test ! -e install-sh; then
ln -s install-sh.dist install-sh
fi
echo "Done."
astra-toolbox-2.3.0/build/linux/config.guess.dist 0000775 0000000 0000000 00000130361 14756352071 0022050 0 ustar 00root root 0000000 0000000 #! /bin/sh
# Attempt to guess a canonical system name.
# Copyright 1992-2013 Free Software Foundation, Inc.
timestamp='2013-06-10'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, see .
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that
# program. This Exception is an additional permission under section 7
# of the GNU General Public License, version 3 ("GPLv3").
#
# Originally written by Per Bothner.
#
# You can get the latest version of this script from:
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
#
# Please send patches with a ChangeLog entry to config-patches@gnu.org.
me=`echo "$0" | sed -e 's,.*/,,'`
usage="\
Usage: $0 [OPTION]
Output the configuration name of the system \`$me' is run on.
Operation modes:
-h, --help print this help, then exit
-t, --time-stamp print date of last modification, then exit
-v, --version print version number, then exit
Report bugs and patches to ."
version="\
GNU config.guess ($timestamp)
Originally written by Per Bothner.
Copyright 1992-2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
help="
Try \`$me --help' for more information."
# Parse command line
while test $# -gt 0 ; do
case $1 in
--time-stamp | --time* | -t )
echo "$timestamp" ; exit ;;
--version | -v )
echo "$version" ; exit ;;
--help | --h* | -h )
echo "$usage"; exit ;;
-- ) # Stop option processing
shift; break ;;
- ) # Use stdin as input.
break ;;
-* )
echo "$me: invalid option $1$help" >&2
exit 1 ;;
* )
break ;;
esac
done
if test $# != 0; then
echo "$me: too many arguments$help" >&2
exit 1
fi
trap 'exit 1' 1 2 15
# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
# compiler to aid in system detection is discouraged as it requires
# temporary files to be created and, as you can see below, it is a
# headache to deal with in a portable fashion.
# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
# use `HOST_CC' if defined, but it is deprecated.
# Portable tmp directory creation inspired by the Autoconf team.
set_cc_for_build='
trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
: ${TMPDIR=/tmp} ;
{ tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
{ test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
{ tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
{ echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
dummy=$tmp/dummy ;
tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
case $CC_FOR_BUILD,$HOST_CC,$CC in
,,) echo "int x;" > $dummy.c ;
for c in cc gcc c89 c99 ; do
if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
CC_FOR_BUILD="$c"; break ;
fi ;
done ;
if test x"$CC_FOR_BUILD" = x ; then
CC_FOR_BUILD=no_compiler_found ;
fi
;;
,,*) CC_FOR_BUILD=$CC ;;
,*,*) CC_FOR_BUILD=$HOST_CC ;;
esac ; set_cc_for_build= ;'
# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
# (ghazi@noc.rutgers.edu 1994-08-24)
if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
PATH=$PATH:/.attbin ; export PATH
fi
UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
case "${UNAME_SYSTEM}" in
Linux|GNU|GNU/*)
# If the system lacks a compiler, then just pick glibc.
# We could probably try harder.
LIBC=gnu
eval $set_cc_for_build
cat <<-EOF > $dummy.c
#include
#if defined(__UCLIBC__)
LIBC=uclibc
#elif defined(__dietlibc__)
LIBC=dietlibc
#else
LIBC=gnu
#endif
EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
;;
esac
# Note: order is significant - the case branches are not exclusive.
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
*:NetBSD:*:*)
# NetBSD (nbsd) targets should (where applicable) match one or
# more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
# *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
# switched to ELF, *-*-netbsd* would select the old
# object file format. This provides both forward
# compatibility and a consistent mechanism for selecting the
# object file format.
#
# Note: NetBSD doesn't particularly care about the vendor
# portion of the name. We always set it to "unknown".
sysctl="sysctl -n hw.machine_arch"
UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
/usr/sbin/$sysctl 2>/dev/null || echo unknown)`
case "${UNAME_MACHINE_ARCH}" in
armeb) machine=armeb-unknown ;;
arm*) machine=arm-unknown ;;
sh3el) machine=shl-unknown ;;
sh3eb) machine=sh-unknown ;;
sh5el) machine=sh5le-unknown ;;
*) machine=${UNAME_MACHINE_ARCH}-unknown ;;
esac
# The Operating System including object format, if it has switched
# to ELF recently, or will in the future.
case "${UNAME_MACHINE_ARCH}" in
arm*|i386|m68k|ns32k|sh3*|sparc|vax)
eval $set_cc_for_build
if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ELF__
then
# Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
# Return netbsd for either. FIX?
os=netbsd
else
os=netbsdelf
fi
;;
*)
os=netbsd
;;
esac
# The OS release
# Debian GNU/NetBSD machines have a different userland, and
# thus, need a distinct triplet. However, they do not need
# kernel version information, so it can be replaced with a
# suitable tag, in the style of linux-gnu.
case "${UNAME_VERSION}" in
Debian*)
release='-gnu'
;;
*)
release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
;;
esac
# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
# contains redundant information, the shorter form:
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
echo "${machine}-${os}${release}"
exit ;;
*:Bitrig:*:*)
UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
exit ;;
*:OpenBSD:*:*)
UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
exit ;;
*:ekkoBSD:*:*)
echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
exit ;;
*:SolidBSD:*:*)
echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
exit ;;
macppc:MirBSD:*:*)
echo powerpc-unknown-mirbsd${UNAME_RELEASE}
exit ;;
*:MirBSD:*:*)
echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
exit ;;
alpha:OSF1:*:*)
case $UNAME_RELEASE in
*4.0)
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
;;
*5.*)
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
;;
esac
# According to Compaq, /usr/sbin/psrinfo has been available on
# OSF/1 and Tru64 systems produced since 1995. I hope that
# covers most systems running today. This code pipes the CPU
# types through head -n 1, so we only detect the type of CPU 0.
ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
case "$ALPHA_CPU_TYPE" in
"EV4 (21064)")
UNAME_MACHINE="alpha" ;;
"EV4.5 (21064)")
UNAME_MACHINE="alpha" ;;
"LCA4 (21066/21068)")
UNAME_MACHINE="alpha" ;;
"EV5 (21164)")
UNAME_MACHINE="alphaev5" ;;
"EV5.6 (21164A)")
UNAME_MACHINE="alphaev56" ;;
"EV5.6 (21164PC)")
UNAME_MACHINE="alphapca56" ;;
"EV5.7 (21164PC)")
UNAME_MACHINE="alphapca57" ;;
"EV6 (21264)")
UNAME_MACHINE="alphaev6" ;;
"EV6.7 (21264A)")
UNAME_MACHINE="alphaev67" ;;
"EV6.8CB (21264C)")
UNAME_MACHINE="alphaev68" ;;
"EV6.8AL (21264B)")
UNAME_MACHINE="alphaev68" ;;
"EV6.8CX (21264D)")
UNAME_MACHINE="alphaev68" ;;
"EV6.9A (21264/EV69A)")
UNAME_MACHINE="alphaev69" ;;
"EV7 (21364)")
UNAME_MACHINE="alphaev7" ;;
"EV7.9 (21364A)")
UNAME_MACHINE="alphaev79" ;;
esac
# A Pn.n version is a patched version.
# A Vn.n version is a released version.
# A Tn.n version is a released field test version.
# A Xn.n version is an unreleased experimental baselevel.
# 1.2 uses "1.2" for uname -r.
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
exitcode=$?
trap '' 0
exit $exitcode ;;
Alpha\ *:Windows_NT*:*)
# How do we know it's Interix rather than the generic POSIX subsystem?
# Should we change UNAME_MACHINE based on the output of uname instead
# of the specific Alpha model?
echo alpha-pc-interix
exit ;;
21064:Windows_NT:50:3)
echo alpha-dec-winnt3.5
exit ;;
Amiga*:UNIX_System_V:4.0:*)
echo m68k-unknown-sysv4
exit ;;
*:[Aa]miga[Oo][Ss]:*:*)
echo ${UNAME_MACHINE}-unknown-amigaos
exit ;;
*:[Mm]orph[Oo][Ss]:*:*)
echo ${UNAME_MACHINE}-unknown-morphos
exit ;;
*:OS/390:*:*)
echo i370-ibm-openedition
exit ;;
*:z/VM:*:*)
echo s390-ibm-zvmoe
exit ;;
*:OS400:*:*)
echo powerpc-ibm-os400
exit ;;
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
echo arm-acorn-riscix${UNAME_RELEASE}
exit ;;
arm*:riscos:*:*|arm*:RISCOS:*:*)
echo arm-unknown-riscos
exit ;;
SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
echo hppa1.1-hitachi-hiuxmpp
exit ;;
Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
# akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
if test "`(/bin/universe) 2>/dev/null`" = att ; then
echo pyramid-pyramid-sysv3
else
echo pyramid-pyramid-bsd
fi
exit ;;
NILE*:*:*:dcosx)
echo pyramid-pyramid-svr4
exit ;;
DRS?6000:unix:4.0:6*)
echo sparc-icl-nx6
exit ;;
DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
case `/usr/bin/uname -p` in
sparc) echo sparc-icl-nx7; exit ;;
esac ;;
s390x:SunOS:*:*)
echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;;
sun4H:SunOS:5.*:*)
echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;;
sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;;
i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
echo i386-pc-auroraux${UNAME_RELEASE}
exit ;;
i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
eval $set_cc_for_build
SUN_ARCH="i386"
# If there is a compiler, see if it is configured for 64-bit objects.
# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
# This test works for both compilers.
if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
grep IS_64BIT_ARCH >/dev/null
then
SUN_ARCH="x86_64"
fi
fi
echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;;
sun4*:SunOS:6*:*)
# According to config.sub, this is the proper way to canonicalize
# SunOS6. Hard to guess exactly what SunOS6 will be like, but
# it's likely to be more like Solaris than SunOS4.
echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;;
sun4*:SunOS:*:*)
case "`/usr/bin/arch -k`" in
Series*|S4*)
UNAME_RELEASE=`uname -v`
;;
esac
# Japanese Language versions have a version number like `4.1.3-JL'.
echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
exit ;;
sun3*:SunOS:*:*)
echo m68k-sun-sunos${UNAME_RELEASE}
exit ;;
sun*:*:4.2BSD:*)
UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
case "`/bin/arch`" in
sun3)
echo m68k-sun-sunos${UNAME_RELEASE}
;;
sun4)
echo sparc-sun-sunos${UNAME_RELEASE}
;;
esac
exit ;;
aushp:SunOS:*:*)
echo sparc-auspex-sunos${UNAME_RELEASE}
exit ;;
# The situation for MiNT is a little confusing. The machine name
# can be virtually everything (everything which is not
# "atarist" or "atariste" at least should have a processor
# > m68000). The system name ranges from "MiNT" over "FreeMiNT"
# to the lowercase version "mint" (or "freemint"). Finally
# the system name "TOS" denotes a system which is actually not
# MiNT. But MiNT is downward compatible to TOS, so this should
# be no problem.
atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
echo m68k-atari-mint${UNAME_RELEASE}
exit ;;
atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
echo m68k-atari-mint${UNAME_RELEASE}
exit ;;
*falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
echo m68k-atari-mint${UNAME_RELEASE}
exit ;;
milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
echo m68k-milan-mint${UNAME_RELEASE}
exit ;;
hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
echo m68k-hades-mint${UNAME_RELEASE}
exit ;;
*:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
echo m68k-unknown-mint${UNAME_RELEASE}
exit ;;
m68k:machten:*:*)
echo m68k-apple-machten${UNAME_RELEASE}
exit ;;
powerpc:machten:*:*)
echo powerpc-apple-machten${UNAME_RELEASE}
exit ;;
RISC*:Mach:*:*)
echo mips-dec-mach_bsd4.3
exit ;;
RISC*:ULTRIX:*:*)
echo mips-dec-ultrix${UNAME_RELEASE}
exit ;;
VAX*:ULTRIX*:*:*)
echo vax-dec-ultrix${UNAME_RELEASE}
exit ;;
2020:CLIX:*:* | 2430:CLIX:*:*)
echo clipper-intergraph-clix${UNAME_RELEASE}
exit ;;
mips:*:*:UMIPS | mips:*:*:RISCos)
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
#ifdef __cplusplus
#include /* for printf() prototype */
int main (int argc, char *argv[]) {
#else
int main (argc, argv) int argc; char *argv[]; {
#endif
#if defined (host_mips) && defined (MIPSEB)
#if defined (SYSTYPE_SYSV)
printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
#endif
#if defined (SYSTYPE_SVR4)
printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
#endif
#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
#endif
#endif
exit (-1);
}
EOF
$CC_FOR_BUILD -o $dummy $dummy.c &&
dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
SYSTEM_NAME=`$dummy $dummyarg` &&
{ echo "$SYSTEM_NAME"; exit; }
echo mips-mips-riscos${UNAME_RELEASE}
exit ;;
Motorola:PowerMAX_OS:*:*)
echo powerpc-motorola-powermax
exit ;;
Motorola:*:4.3:PL8-*)
echo powerpc-harris-powermax
exit ;;
Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
echo powerpc-harris-powermax
exit ;;
Night_Hawk:Power_UNIX:*:*)
echo powerpc-harris-powerunix
exit ;;
m88k:CX/UX:7*:*)
echo m88k-harris-cxux7
exit ;;
m88k:*:4*:R4*)
echo m88k-motorola-sysv4
exit ;;
m88k:*:3*:R3*)
echo m88k-motorola-sysv3
exit ;;
AViiON:dgux:*:*)
# DG/UX returns AViiON for all architectures
UNAME_PROCESSOR=`/usr/bin/uname -p`
if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
then
if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
[ ${TARGET_BINARY_INTERFACE}x = x ]
then
echo m88k-dg-dgux${UNAME_RELEASE}
else
echo m88k-dg-dguxbcs${UNAME_RELEASE}
fi
else
echo i586-dg-dgux${UNAME_RELEASE}
fi
exit ;;
M88*:DolphinOS:*:*) # DolphinOS (SVR3)
echo m88k-dolphin-sysv3
exit ;;
M88*:*:R3*:*)
# Delta 88k system running SVR3
echo m88k-motorola-sysv3
exit ;;
XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
echo m88k-tektronix-sysv3
exit ;;
Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
echo m68k-tektronix-bsd
exit ;;
*:IRIX*:*:*)
echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
exit ;;
????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
exit ;; # Note that: echo "'`uname -s`'" gives 'AIX '
i*86:AIX:*:*)
echo i386-ibm-aix
exit ;;
ia64:AIX:*:*)
if [ -x /usr/bin/oslevel ] ; then
IBM_REV=`/usr/bin/oslevel`
else
IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
fi
echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
exit ;;
*:AIX:2:3)
if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
#include
main()
{
if (!__power_pc())
exit(1);
puts("powerpc-ibm-aix3.2.5");
exit(0);
}
EOF
if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
then
echo "$SYSTEM_NAME"
else
echo rs6000-ibm-aix3.2.5
fi
elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
echo rs6000-ibm-aix3.2.4
else
echo rs6000-ibm-aix3.2
fi
exit ;;
*:AIX:*:[4567])
IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
IBM_ARCH=rs6000
else
IBM_ARCH=powerpc
fi
if [ -x /usr/bin/oslevel ] ; then
IBM_REV=`/usr/bin/oslevel`
else
IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
fi
echo ${IBM_ARCH}-ibm-aix${IBM_REV}
exit ;;
*:AIX:*:*)
echo rs6000-ibm-aix
exit ;;
ibmrt:4.4BSD:*|romp-ibm:BSD:*)
echo romp-ibm-bsd4.4
exit ;;
ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
exit ;; # report: romp-ibm BSD 4.3
*:BOSX:*:*)
echo rs6000-bull-bosx
exit ;;
DPX/2?00:B.O.S.:*:*)
echo m68k-bull-sysv3
exit ;;
9000/[34]??:4.3bsd:1.*:*)
echo m68k-hp-bsd
exit ;;
hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
echo m68k-hp-bsd4.4
exit ;;
9000/[34678]??:HP-UX:*:*)
HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
case "${UNAME_MACHINE}" in
9000/31? ) HP_ARCH=m68000 ;;
9000/[34]?? ) HP_ARCH=m68k ;;
9000/[678][0-9][0-9])
if [ -x /usr/bin/getconf ]; then
sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
case "${sc_cpu_version}" in
523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
532) # CPU_PA_RISC2_0
case "${sc_kernel_bits}" in
32) HP_ARCH="hppa2.0n" ;;
64) HP_ARCH="hppa2.0w" ;;
'') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
esac ;;
esac
fi
if [ "${HP_ARCH}" = "" ]; then
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
#define _HPUX_SOURCE
#include
#include
int main ()
{
#if defined(_SC_KERNEL_BITS)
long bits = sysconf(_SC_KERNEL_BITS);
#endif
long cpu = sysconf (_SC_CPU_VERSION);
switch (cpu)
{
case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
case CPU_PA_RISC2_0:
#if defined(_SC_KERNEL_BITS)
switch (bits)
{
case 64: puts ("hppa2.0w"); break;
case 32: puts ("hppa2.0n"); break;
default: puts ("hppa2.0"); break;
} break;
#else /* !defined(_SC_KERNEL_BITS) */
puts ("hppa2.0"); break;
#endif
default: puts ("hppa1.0"); break;
}
exit (0);
}
EOF
(CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
test -z "$HP_ARCH" && HP_ARCH=hppa
fi ;;
esac
if [ ${HP_ARCH} = "hppa2.0w" ]
then
eval $set_cc_for_build
# hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
# 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
# generating 64-bit code. GNU and HP use different nomenclature:
#
# $ CC_FOR_BUILD=cc ./config.guess
# => hppa2.0w-hp-hpux11.23
# $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
# => hppa64-hp-hpux11.23
if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
grep -q __LP64__
then
HP_ARCH="hppa2.0w"
else
HP_ARCH="hppa64"
fi
fi
echo ${HP_ARCH}-hp-hpux${HPUX_REV}
exit ;;
ia64:HP-UX:*:*)
HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
echo ia64-hp-hpux${HPUX_REV}
exit ;;
3050*:HI-UX:*:*)
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
#include
int
main ()
{
long cpu = sysconf (_SC_CPU_VERSION);
/* The order matters, because CPU_IS_HP_MC68K erroneously returns
true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
results, however. */
if (CPU_IS_PA_RISC (cpu))
{
switch (cpu)
{
case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
default: puts ("hppa-hitachi-hiuxwe2"); break;
}
}
else if (CPU_IS_HP_MC68K (cpu))
puts ("m68k-hitachi-hiuxwe2");
else puts ("unknown-hitachi-hiuxwe2");
exit (0);
}
EOF
$CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
{ echo "$SYSTEM_NAME"; exit; }
echo unknown-hitachi-hiuxwe2
exit ;;
9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
echo hppa1.1-hp-bsd
exit ;;
9000/8??:4.3bsd:*:*)
echo hppa1.0-hp-bsd
exit ;;
*9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
echo hppa1.0-hp-mpeix
exit ;;
hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
echo hppa1.1-hp-osf
exit ;;
hp8??:OSF1:*:*)
echo hppa1.0-hp-osf
exit ;;
i*86:OSF1:*:*)
if [ -x /usr/sbin/sysversion ] ; then
echo ${UNAME_MACHINE}-unknown-osf1mk
else
echo ${UNAME_MACHINE}-unknown-osf1
fi
exit ;;
parisc*:Lites*:*:*)
echo hppa1.1-hp-lites
exit ;;
C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
echo c1-convex-bsd
exit ;;
C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
if getsysinfo -f scalar_acc
then echo c32-convex-bsd
else echo c2-convex-bsd
fi
exit ;;
C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
echo c34-convex-bsd
exit ;;
C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
echo c38-convex-bsd
exit ;;
C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
echo c4-convex-bsd
exit ;;
CRAY*Y-MP:*:*:*)
echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit ;;
CRAY*[A-Z]90:*:*:*)
echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
-e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
-e 's/\.[^.]*$/.X/'
exit ;;
CRAY*TS:*:*:*)
echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit ;;
CRAY*T3E:*:*:*)
echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit ;;
CRAY*SV1:*:*:*)
echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit ;;
*:UNICOS/mp:*:*)
echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit ;;
F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
exit ;;
5000:UNIX_System_V:4.*:*)
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
exit ;;
i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
exit ;;
sparc*:BSD/OS:*:*)
echo sparc-unknown-bsdi${UNAME_RELEASE}
exit ;;
*:BSD/OS:*:*)
echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
exit ;;
*:FreeBSD:*:*)
UNAME_PROCESSOR=`/usr/bin/uname -p`
case ${UNAME_PROCESSOR} in
amd64)
echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
*)
echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
esac
exit ;;
i*:CYGWIN*:*)
echo ${UNAME_MACHINE}-pc-cygwin
exit ;;
*:MINGW64*:*)
echo ${UNAME_MACHINE}-pc-mingw64
exit ;;
*:MINGW*:*)
echo ${UNAME_MACHINE}-pc-mingw32
exit ;;
i*:MSYS*:*)
echo ${UNAME_MACHINE}-pc-msys
exit ;;
i*:windows32*:*)
# uname -m includes "-pc" on this system.
echo ${UNAME_MACHINE}-mingw32
exit ;;
i*:PW*:*)
echo ${UNAME_MACHINE}-pc-pw32
exit ;;
*:Interix*:*)
case ${UNAME_MACHINE} in
x86)
echo i586-pc-interix${UNAME_RELEASE}
exit ;;
authenticamd | genuineintel | EM64T)
echo x86_64-unknown-interix${UNAME_RELEASE}
exit ;;
IA64)
echo ia64-unknown-interix${UNAME_RELEASE}
exit ;;
esac ;;
[345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
echo i${UNAME_MACHINE}-pc-mks
exit ;;
8664:Windows_NT:*)
echo x86_64-pc-mks
exit ;;
i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
# How do we know it's Interix rather than the generic POSIX subsystem?
# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
# UNAME_MACHINE based on the output of uname instead of i386?
echo i586-pc-interix
exit ;;
i*:UWIN*:*)
echo ${UNAME_MACHINE}-pc-uwin
exit ;;
amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
echo x86_64-unknown-cygwin
exit ;;
p*:CYGWIN*:*)
echo powerpcle-unknown-cygwin
exit ;;
prep*:SunOS:5.*:*)
echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;;
*:GNU:*:*)
# the GNU system
echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
exit ;;
*:GNU/*:*:*)
# other systems with GNU libc and userland
echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
exit ;;
i*86:Minix:*:*)
echo ${UNAME_MACHINE}-pc-minix
exit ;;
aarch64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
aarch64_be:Linux:*:*)
UNAME_MACHINE=aarch64_be
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
alpha:Linux:*:*)
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
EV5) UNAME_MACHINE=alphaev5 ;;
EV56) UNAME_MACHINE=alphaev56 ;;
PCA56) UNAME_MACHINE=alphapca56 ;;
PCA57) UNAME_MACHINE=alphapca56 ;;
EV6) UNAME_MACHINE=alphaev6 ;;
EV67) UNAME_MACHINE=alphaev67 ;;
EV68*) UNAME_MACHINE=alphaev68 ;;
esac
objdump --private-headers /bin/sh | grep -q ld.so.1
if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
arc:Linux:*:* | arceb:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
arm*:Linux:*:*)
eval $set_cc_for_build
if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ARM_EABI__
then
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
else
if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ARM_PCS_VFP
then
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
else
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
fi
fi
exit ;;
avr32*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
cris:Linux:*:*)
echo ${UNAME_MACHINE}-axis-linux-${LIBC}
exit ;;
crisv32:Linux:*:*)
echo ${UNAME_MACHINE}-axis-linux-${LIBC}
exit ;;
frv:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
hexagon:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
i*86:Linux:*:*)
echo ${UNAME_MACHINE}-pc-linux-${LIBC}
exit ;;
ia64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
m32r*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
m68*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
mips:Linux:*:* | mips64:Linux:*:*)
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
#undef CPU
#undef ${UNAME_MACHINE}
#undef ${UNAME_MACHINE}el
#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
CPU=${UNAME_MACHINE}el
#else
#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
CPU=${UNAME_MACHINE}
#else
CPU=
#endif
#endif
EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
;;
or1k:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
or32:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
padre:Linux:*:*)
echo sparc-unknown-linux-${LIBC}
exit ;;
parisc64:Linux:*:* | hppa64:Linux:*:*)
echo hppa64-unknown-linux-${LIBC}
exit ;;
parisc:Linux:*:* | hppa:Linux:*:*)
# Look for CPU level
case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
*) echo hppa-unknown-linux-${LIBC} ;;
esac
exit ;;
ppc64:Linux:*:*)
echo powerpc64-unknown-linux-${LIBC}
exit ;;
ppc:Linux:*:*)
echo powerpc-unknown-linux-${LIBC}
exit ;;
ppc64le:Linux:*:*)
echo powerpc64le-unknown-linux-${LIBC}
exit ;;
ppcle:Linux:*:*)
echo powerpcle-unknown-linux-${LIBC}
exit ;;
s390:Linux:*:* | s390x:Linux:*:*)
echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
exit ;;
sh64*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
sh*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
sparc:Linux:*:* | sparc64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
tile*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
vax:Linux:*:*)
echo ${UNAME_MACHINE}-dec-linux-${LIBC}
exit ;;
x86_64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
xtensa*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
i*86:DYNIX/ptx:4*:*)
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
# earlier versions are messed up and put the nodename in both
# sysname and nodename.
echo i386-sequent-sysv4
exit ;;
i*86:UNIX_SV:4.2MP:2.*)
# Unixware is an offshoot of SVR4, but it has its own version
# number series starting with 2...
# I am not positive that other SVR4 systems won't match this,
# I just have to hope. -- rms.
# Use sysv4.2uw... so that sysv4* matches it.
echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
exit ;;
i*86:OS/2:*:*)
# If we were able to find `uname', then EMX Unix compatibility
# is probably installed.
echo ${UNAME_MACHINE}-pc-os2-emx
exit ;;
i*86:XTS-300:*:STOP)
echo ${UNAME_MACHINE}-unknown-stop
exit ;;
i*86:atheos:*:*)
echo ${UNAME_MACHINE}-unknown-atheos
exit ;;
i*86:syllable:*:*)
echo ${UNAME_MACHINE}-pc-syllable
exit ;;
i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
echo i386-unknown-lynxos${UNAME_RELEASE}
exit ;;
i*86:*DOS:*:*)
echo ${UNAME_MACHINE}-pc-msdosdjgpp
exit ;;
i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
else
echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
fi
exit ;;
i*86:*:5:[678]*)
# UnixWare 7.x, OpenUNIX and OpenServer 6.
case `/bin/uname -X | grep "^Machine"` in
*486*) UNAME_MACHINE=i486 ;;
*Pentium) UNAME_MACHINE=i586 ;;
*Pent*|*Celeron) UNAME_MACHINE=i686 ;;
esac
echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
exit ;;
i*86:*:3.2:*)
if test -f /usr/options/cb.name; then
UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then
UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
(/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
(/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
&& UNAME_MACHINE=i586
(/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
&& UNAME_MACHINE=i686
(/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
&& UNAME_MACHINE=i686
echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
else
echo ${UNAME_MACHINE}-pc-sysv32
fi
exit ;;
pc:*:*:*)
# Left here for compatibility:
# uname -m prints for DJGPP always 'pc', but it prints nothing about
# the processor, so we play safe by assuming i586.
# Note: whatever this is, it MUST be the same as what config.sub
# prints for the "djgpp" host, or else GDB configury will decide that
# this is a cross-build.
echo i586-pc-msdosdjgpp
exit ;;
Intel:Mach:3*:*)
echo i386-pc-mach3
exit ;;
paragon:*:*:*)
echo i860-intel-osf1
exit ;;
i860:*:4.*:*) # i860-SVR4
if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
else # Add other i860-SVR4 vendors below as they are discovered.
echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
fi
exit ;;
mini*:CTIX:SYS*5:*)
# "miniframe"
echo m68010-convergent-sysv
exit ;;
mc68k:UNIX:SYSTEM5:3.51m)
echo m68k-convergent-sysv
exit ;;
M680?0:D-NIX:5.3:*)
echo m68k-diab-dnix
exit ;;
M68*:*:R3V[5678]*:*)
test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
OS_REL=''
test -r /etc/.relid \
&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
&& { echo i486-ncr-sysv4.3${OS_REL}; exit; }
/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
&& { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
&& { echo i486-ncr-sysv4; exit; } ;;
NCR*:*:4.2:* | MPRAS*:*:4.2:*)
OS_REL='.3'
test -r /etc/.relid \
&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
&& { echo i486-ncr-sysv4.3${OS_REL}; exit; }
/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
&& { echo i586-ncr-sysv4.3${OS_REL}; exit; }
/bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
&& { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
echo m68k-unknown-lynxos${UNAME_RELEASE}
exit ;;
mc68030:UNIX_System_V:4.*:*)
echo m68k-atari-sysv4
exit ;;
TSUNAMI:LynxOS:2.*:*)
echo sparc-unknown-lynxos${UNAME_RELEASE}
exit ;;
rs6000:LynxOS:2.*:*)
echo rs6000-unknown-lynxos${UNAME_RELEASE}
exit ;;
PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
echo powerpc-unknown-lynxos${UNAME_RELEASE}
exit ;;
SM[BE]S:UNIX_SV:*:*)
echo mips-dde-sysv${UNAME_RELEASE}
exit ;;
RM*:ReliantUNIX-*:*:*)
echo mips-sni-sysv4
exit ;;
RM*:SINIX-*:*:*)
echo mips-sni-sysv4
exit ;;
*:SINIX-*:*:*)
if uname -p 2>/dev/null >/dev/null ; then
UNAME_MACHINE=`(uname -p) 2>/dev/null`
echo ${UNAME_MACHINE}-sni-sysv4
else
echo ns32k-sni-sysv
fi
exit ;;
PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
# says
echo i586-unisys-sysv4
exit ;;
*:UNIX_System_V:4*:FTX*)
# From Gerald Hewes .
# How about differentiating between stratus architectures? -djm
echo hppa1.1-stratus-sysv4
exit ;;
*:*:*:FTX*)
# From seanf@swdc.stratus.com.
echo i860-stratus-sysv4
exit ;;
i*86:VOS:*:*)
# From Paul.Green@stratus.com.
echo ${UNAME_MACHINE}-stratus-vos
exit ;;
*:VOS:*:*)
# From Paul.Green@stratus.com.
echo hppa1.1-stratus-vos
exit ;;
mc68*:A/UX:*:*)
echo m68k-apple-aux${UNAME_RELEASE}
exit ;;
news*:NEWS-OS:6*:*)
echo mips-sony-newsos6
exit ;;
R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
if [ -d /usr/nec ]; then
echo mips-nec-sysv${UNAME_RELEASE}
else
echo mips-unknown-sysv${UNAME_RELEASE}
fi
exit ;;
BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
echo powerpc-be-beos
exit ;;
BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
echo powerpc-apple-beos
exit ;;
BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
echo i586-pc-beos
exit ;;
BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
echo i586-pc-haiku
exit ;;
x86_64:Haiku:*:*)
echo x86_64-unknown-haiku
exit ;;
SX-4:SUPER-UX:*:*)
echo sx4-nec-superux${UNAME_RELEASE}
exit ;;
SX-5:SUPER-UX:*:*)
echo sx5-nec-superux${UNAME_RELEASE}
exit ;;
SX-6:SUPER-UX:*:*)
echo sx6-nec-superux${UNAME_RELEASE}
exit ;;
SX-7:SUPER-UX:*:*)
echo sx7-nec-superux${UNAME_RELEASE}
exit ;;
SX-8:SUPER-UX:*:*)
echo sx8-nec-superux${UNAME_RELEASE}
exit ;;
SX-8R:SUPER-UX:*:*)
echo sx8r-nec-superux${UNAME_RELEASE}
exit ;;
Power*:Rhapsody:*:*)
echo powerpc-apple-rhapsody${UNAME_RELEASE}
exit ;;
*:Rhapsody:*:*)
echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
exit ;;
*:Darwin:*:*)
UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
eval $set_cc_for_build
if test "$UNAME_PROCESSOR" = unknown ; then
UNAME_PROCESSOR=powerpc
fi
if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
grep IS_64BIT_ARCH >/dev/null
then
case $UNAME_PROCESSOR in
i386) UNAME_PROCESSOR=x86_64 ;;
powerpc) UNAME_PROCESSOR=powerpc64 ;;
esac
fi
fi
echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
exit ;;
*:procnto*:*:* | *:QNX:[0123456789]*:*)
UNAME_PROCESSOR=`uname -p`
if test "$UNAME_PROCESSOR" = "x86"; then
UNAME_PROCESSOR=i386
UNAME_MACHINE=pc
fi
echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
exit ;;
*:QNX:*:4*)
echo i386-pc-qnx
exit ;;
NEO-?:NONSTOP_KERNEL:*:*)
echo neo-tandem-nsk${UNAME_RELEASE}
exit ;;
NSE-*:NONSTOP_KERNEL:*:*)
echo nse-tandem-nsk${UNAME_RELEASE}
exit ;;
NSR-?:NONSTOP_KERNEL:*:*)
echo nsr-tandem-nsk${UNAME_RELEASE}
exit ;;
*:NonStop-UX:*:*)
echo mips-compaq-nonstopux
exit ;;
BS2000:POSIX*:*:*)
echo bs2000-siemens-sysv
exit ;;
DS/*:UNIX_System_V:*:*)
echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
exit ;;
*:Plan9:*:*)
# "uname -m" is not consistent, so use $cputype instead. 386
# is converted to i386 for consistency with other x86
# operating systems.
if test "$cputype" = "386"; then
UNAME_MACHINE=i386
else
UNAME_MACHINE="$cputype"
fi
echo ${UNAME_MACHINE}-unknown-plan9
exit ;;
*:TOPS-10:*:*)
echo pdp10-unknown-tops10
exit ;;
*:TENEX:*:*)
echo pdp10-unknown-tenex
exit ;;
KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
echo pdp10-dec-tops20
exit ;;
XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
echo pdp10-xkl-tops20
exit ;;
*:TOPS-20:*:*)
echo pdp10-unknown-tops20
exit ;;
*:ITS:*:*)
echo pdp10-unknown-its
exit ;;
SEI:*:*:SEIUX)
echo mips-sei-seiux${UNAME_RELEASE}
exit ;;
*:DragonFly:*:*)
echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
exit ;;
*:*VMS:*:*)
UNAME_MACHINE=`(uname -p) 2>/dev/null`
case "${UNAME_MACHINE}" in
A*) echo alpha-dec-vms ; exit ;;
I*) echo ia64-dec-vms ; exit ;;
V*) echo vax-dec-vms ; exit ;;
esac ;;
*:XENIX:*:SysV)
echo i386-pc-xenix
exit ;;
i*86:skyos:*:*)
echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
exit ;;
i*86:rdos:*:*)
echo ${UNAME_MACHINE}-pc-rdos
exit ;;
i*86:AROS:*:*)
echo ${UNAME_MACHINE}-pc-aros
exit ;;
x86_64:VMkernel:*:*)
echo ${UNAME_MACHINE}-unknown-esx
exit ;;
esac
eval $set_cc_for_build
cat >$dummy.c <
# include
#endif
main ()
{
#if defined (sony)
#if defined (MIPSEB)
/* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
I don't know.... */
printf ("mips-sony-bsd\n"); exit (0);
#else
#include
printf ("m68k-sony-newsos%s\n",
#ifdef NEWSOS4
"4"
#else
""
#endif
); exit (0);
#endif
#endif
#if defined (__arm) && defined (__acorn) && defined (__unix)
printf ("arm-acorn-riscix\n"); exit (0);
#endif
#if defined (hp300) && !defined (hpux)
printf ("m68k-hp-bsd\n"); exit (0);
#endif
#if defined (NeXT)
#if !defined (__ARCHITECTURE__)
#define __ARCHITECTURE__ "m68k"
#endif
int version;
version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
if (version < 4)
printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
else
printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
exit (0);
#endif
#if defined (MULTIMAX) || defined (n16)
#if defined (UMAXV)
printf ("ns32k-encore-sysv\n"); exit (0);
#else
#if defined (CMU)
printf ("ns32k-encore-mach\n"); exit (0);
#else
printf ("ns32k-encore-bsd\n"); exit (0);
#endif
#endif
#endif
#if defined (__386BSD__)
printf ("i386-pc-bsd\n"); exit (0);
#endif
#if defined (sequent)
#if defined (i386)
printf ("i386-sequent-dynix\n"); exit (0);
#endif
#if defined (ns32000)
printf ("ns32k-sequent-dynix\n"); exit (0);
#endif
#endif
#if defined (_SEQUENT_)
struct utsname un;
uname(&un);
if (strncmp(un.version, "V2", 2) == 0) {
printf ("i386-sequent-ptx2\n"); exit (0);
}
if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
printf ("i386-sequent-ptx1\n"); exit (0);
}
printf ("i386-sequent-ptx\n"); exit (0);
#endif
#if defined (vax)
# if !defined (ultrix)
# include
# if defined (BSD)
# if BSD == 43
printf ("vax-dec-bsd4.3\n"); exit (0);
# else
# if BSD == 199006
printf ("vax-dec-bsd4.3reno\n"); exit (0);
# else
printf ("vax-dec-bsd\n"); exit (0);
# endif
# endif
# else
printf ("vax-dec-bsd\n"); exit (0);
# endif
# else
printf ("vax-dec-ultrix\n"); exit (0);
# endif
#endif
#if defined (alliant) && defined (i860)
printf ("i860-alliant-bsd\n"); exit (0);
#endif
exit (1);
}
EOF
$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
{ echo "$SYSTEM_NAME"; exit; }
# Apollos put the system type in the environment.
test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
# Convex versions that predate uname can use getsysinfo(1)
if [ -x /usr/convex/getsysinfo ]
then
case `getsysinfo -f cpu_type` in
c1*)
echo c1-convex-bsd
exit ;;
c2*)
if getsysinfo -f scalar_acc
then echo c32-convex-bsd
else echo c2-convex-bsd
fi
exit ;;
c34*)
echo c34-convex-bsd
exit ;;
c38*)
echo c38-convex-bsd
exit ;;
c4*)
echo c4-convex-bsd
exit ;;
esac
fi
cat >&2 < in order to provide the needed
information to handle your system.
config.guess timestamp = $timestamp
uname -m = `(uname -m) 2>/dev/null || echo unknown`
uname -r = `(uname -r) 2>/dev/null || echo unknown`
uname -s = `(uname -s) 2>/dev/null || echo unknown`
uname -v = `(uname -v) 2>/dev/null || echo unknown`
/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
/bin/uname -X = `(/bin/uname -X) 2>/dev/null`
hostinfo = `(hostinfo) 2>/dev/null`
/bin/universe = `(/bin/universe) 2>/dev/null`
/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`
/bin/arch = `(/bin/arch) 2>/dev/null`
/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
UNAME_MACHINE = ${UNAME_MACHINE}
UNAME_RELEASE = ${UNAME_RELEASE}
UNAME_SYSTEM = ${UNAME_SYSTEM}
UNAME_VERSION = ${UNAME_VERSION}
EOF
exit 1
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "timestamp='"
# time-stamp-format: "%:y-%02m-%02d"
# time-stamp-end: "'"
# End:
astra-toolbox-2.3.0/build/linux/config.sub.dist 0000775 0000000 0000000 00000105370 14756352071 0021515 0 ustar 00root root 0000000 0000000 #! /bin/sh
# Configuration validation subroutine script.
# Copyright 1992-2013 Free Software Foundation, Inc.
timestamp='2013-08-10'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, see .
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that
# program. This Exception is an additional permission under section 7
# of the GNU General Public License, version 3 ("GPLv3").
# Please send patches with a ChangeLog entry to config-patches@gnu.org.
#
# Configuration subroutine to validate and canonicalize a configuration type.
# Supply the specified configuration type as an argument.
# If it is invalid, we print an error message on stderr and exit with code 1.
# Otherwise, we print the canonical config type on stdout and succeed.
# You can get the latest version of this script from:
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
# This file is supposed to be the same for all GNU packages
# and recognize all the CPU types, system types and aliases
# that are meaningful with *any* GNU software.
# Each package is responsible for reporting which valid configurations
# it does not support. The user should be able to distinguish
# a failure to support a valid configuration from a meaningless
# configuration.
# The goal of this file is to map all the various variations of a given
# machine specification into a single specification in the form:
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
# or in some cases, the newer four-part form:
# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
# It is wrong to echo any other type of specification.
me=`echo "$0" | sed -e 's,.*/,,'`
usage="\
Usage: $0 [OPTION] CPU-MFR-OPSYS
$0 [OPTION] ALIAS
Canonicalize a configuration name.
Operation modes:
-h, --help print this help, then exit
-t, --time-stamp print date of last modification, then exit
-v, --version print version number, then exit
Report bugs and patches to ."
version="\
GNU config.sub ($timestamp)
Copyright 1992-2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
help="
Try \`$me --help' for more information."
# Parse command line
while test $# -gt 0 ; do
case $1 in
--time-stamp | --time* | -t )
echo "$timestamp" ; exit ;;
--version | -v )
echo "$version" ; exit ;;
--help | --h* | -h )
echo "$usage"; exit ;;
-- ) # Stop option processing
shift; break ;;
- ) # Use stdin as input.
break ;;
-* )
echo "$me: invalid option $1$help"
exit 1 ;;
*local*)
# First pass through any local machine types.
echo $1
exit ;;
* )
break ;;
esac
done
case $# in
0) echo "$me: missing argument$help" >&2
exit 1;;
1) ;;
*) echo "$me: too many arguments$help" >&2
exit 1;;
esac
# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
# Here we must recognize all the valid KERNEL-OS combinations.
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in
nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
knetbsd*-gnu* | netbsd*-gnu* | \
kopensolaris*-gnu* | \
storm-chaos* | os2-emx* | rtmk-nova*)
os=-$maybe_os
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
;;
android-linux)
os=-linux-android
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
;;
*)
basic_machine=`echo $1 | sed 's/-[^-]*$//'`
if [ $basic_machine != $1 ]
then os=`echo $1 | sed 's/.*-/-/'`
else os=; fi
;;
esac
### Let's recognize common machines as not being operating systems so
### that things like config.sub decstation-3100 work. We also
### recognize some manufacturers as not being operating systems, so we
### can provide default operating systems below.
case $os in
-sun*os*)
# Prevent following clause from handling this invalid input.
;;
-dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
-att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
-unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
-apple | -axis | -knuth | -cray | -microblaze*)
os=
basic_machine=$1
;;
-bluegene*)
os=-cnk
;;
-sim | -cisco | -oki | -wec | -winbond)
os=
basic_machine=$1
;;
-scout)
;;
-wrs)
os=-vxworks
basic_machine=$1
;;
-chorusos*)
os=-chorusos
basic_machine=$1
;;
-chorusrdb)
os=-chorusrdb
basic_machine=$1
;;
-hiux*)
os=-hiuxwe2
;;
-sco6)
os=-sco5v6
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-sco5)
os=-sco3.2v5
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-sco4)
os=-sco3.2v4
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-sco3.2.[4-9]*)
os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-sco3.2v[4-9]*)
# Don't forget version if it is 3.2v4 or newer.
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-sco5v6*)
# Don't forget version if it is 3.2v4 or newer.
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-sco*)
os=-sco3.2v2
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-udk*)
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-isc)
os=-isc2.2
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-clix*)
basic_machine=clipper-intergraph
;;
-isc*)
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-lynx*178)
os=-lynxos178
;;
-lynx*5)
os=-lynxos5
;;
-lynx*)
os=-lynxos
;;
-ptx*)
basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
;;
-windowsnt*)
os=`echo $os | sed -e 's/windowsnt/winnt/'`
;;
-psos*)
os=-psos
;;
-mint | -mint[0-9]*)
basic_machine=m68k-atari
os=-mint
;;
esac
# Decode aliases for certain CPU-COMPANY combinations.
case $basic_machine in
# Recognize the basic CPU types without company name.
# Some are omitted here because they have special meanings below.
1750a | 580 \
| a29k \
| aarch64 | aarch64_be \
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
| am33_2.0 \
| arc | arceb \
| arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
| avr | avr32 \
| be32 | be64 \
| bfin \
| c4x | c8051 | clipper \
| d10v | d30v | dlx | dsp16xx \
| epiphany \
| fido | fr30 | frv \
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
| hexagon \
| i370 | i860 | i960 | ia64 \
| ip2k | iq2000 \
| le32 | le64 \
| lm32 \
| m32c | m32r | m32rle | m68000 | m68k | m88k \
| maxq | mb | microblaze | microblazeel | mcore | mep | metag \
| mips | mipsbe | mipseb | mipsel | mipsle \
| mips16 \
| mips64 | mips64el \
| mips64octeon | mips64octeonel \
| mips64orion | mips64orionel \
| mips64r5900 | mips64r5900el \
| mips64vr | mips64vrel \
| mips64vr4100 | mips64vr4100el \
| mips64vr4300 | mips64vr4300el \
| mips64vr5000 | mips64vr5000el \
| mips64vr5900 | mips64vr5900el \
| mipsisa32 | mipsisa32el \
| mipsisa32r2 | mipsisa32r2el \
| mipsisa64 | mipsisa64el \
| mipsisa64r2 | mipsisa64r2el \
| mipsisa64sb1 | mipsisa64sb1el \
| mipsisa64sr71k | mipsisa64sr71kel \
| mipsr5900 | mipsr5900el \
| mipstx39 | mipstx39el \
| mn10200 | mn10300 \
| moxie \
| mt \
| msp430 \
| nds32 | nds32le | nds32be \
| nios | nios2 | nios2eb | nios2el \
| ns16k | ns32k \
| open8 \
| or1k | or32 \
| pdp10 | pdp11 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle \
| pyramid \
| rl78 | rx \
| score \
| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
| sh64 | sh64le \
| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
| spu \
| tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
| ubicom32 \
| v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
| we32k \
| x86 | xc16x | xstormy16 | xtensa \
| z8k | z80)
basic_machine=$basic_machine-unknown
;;
c54x)
basic_machine=tic54x-unknown
;;
c55x)
basic_machine=tic55x-unknown
;;
c6x)
basic_machine=tic6x-unknown
;;
m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip)
basic_machine=$basic_machine-unknown
os=-none
;;
m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
;;
ms1)
basic_machine=mt-unknown
;;
strongarm | thumb | xscale)
basic_machine=arm-unknown
;;
xgate)
basic_machine=$basic_machine-unknown
os=-none
;;
xscaleeb)
basic_machine=armeb-unknown
;;
xscaleel)
basic_machine=armel-unknown
;;
# We use `pc' rather than `unknown'
# because (1) that's what they normally are, and
# (2) the word "unknown" tends to confuse beginning users.
i*86 | x86_64)
basic_machine=$basic_machine-pc
;;
# Object if more than one company name word.
*-*-*)
echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
exit 1
;;
# Recognize the basic CPU types with company name.
580-* \
| a29k-* \
| aarch64-* | aarch64_be-* \
| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
| avr-* | avr32-* \
| be32-* | be64-* \
| bfin-* | bs2000-* \
| c[123]* | c30-* | [cjt]90-* | c4x-* \
| c8051-* | clipper-* | craynv-* | cydra-* \
| d10v-* | d30v-* | dlx-* \
| elxsi-* \
| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
| h8300-* | h8500-* \
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
| hexagon-* \
| i*86-* | i860-* | i960-* | ia64-* \
| ip2k-* | iq2000-* \
| le32-* | le64-* \
| lm32-* \
| m32c-* | m32r-* | m32rle-* \
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
| m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
| microblaze-* | microblazeel-* \
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
| mips16-* \
| mips64-* | mips64el-* \
| mips64octeon-* | mips64octeonel-* \
| mips64orion-* | mips64orionel-* \
| mips64r5900-* | mips64r5900el-* \
| mips64vr-* | mips64vrel-* \
| mips64vr4100-* | mips64vr4100el-* \
| mips64vr4300-* | mips64vr4300el-* \
| mips64vr5000-* | mips64vr5000el-* \
| mips64vr5900-* | mips64vr5900el-* \
| mipsisa32-* | mipsisa32el-* \
| mipsisa32r2-* | mipsisa32r2el-* \
| mipsisa64-* | mipsisa64el-* \
| mipsisa64r2-* | mipsisa64r2el-* \
| mipsisa64sb1-* | mipsisa64sb1el-* \
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
| mipsr5900-* | mipsr5900el-* \
| mipstx39-* | mipstx39el-* \
| mmix-* \
| mt-* \
| msp430-* \
| nds32-* | nds32le-* | nds32be-* \
| nios-* | nios2-* | nios2eb-* | nios2el-* \
| none-* | np1-* | ns16k-* | ns32k-* \
| open8-* \
| orion-* \
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
| pyramid-* \
| rl78-* | romp-* | rs6000-* | rx-* \
| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
| sparclite-* \
| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
| tahoe-* \
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
| tile*-* \
| tron-* \
| ubicom32-* \
| v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
| vax-* \
| we32k-* \
| x86-* | x86_64-* | xc16x-* | xps100-* \
| xstormy16-* | xtensa*-* \
| ymp-* \
| z8k-* | z80-*)
;;
# Recognize the basic CPU types without company name, with glob match.
xtensa*)
basic_machine=$basic_machine-unknown
;;
# Recognize the various machine names and aliases which stand
# for a CPU type and a company and sometimes even an OS.
386bsd)
basic_machine=i386-unknown
os=-bsd
;;
3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
basic_machine=m68000-att
;;
3b*)
basic_machine=we32k-att
;;
a29khif)
basic_machine=a29k-amd
os=-udi
;;
abacus)
basic_machine=abacus-unknown
;;
adobe68k)
basic_machine=m68010-adobe
os=-scout
;;
alliant | fx80)
basic_machine=fx80-alliant
;;
altos | altos3068)
basic_machine=m68k-altos
;;
am29k)
basic_machine=a29k-none
os=-bsd
;;
amd64)
basic_machine=x86_64-pc
;;
amd64-*)
basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
amdahl)
basic_machine=580-amdahl
os=-sysv
;;
amiga | amiga-*)
basic_machine=m68k-unknown
;;
amigaos | amigados)
basic_machine=m68k-unknown
os=-amigaos
;;
amigaunix | amix)
basic_machine=m68k-unknown
os=-sysv4
;;
apollo68)
basic_machine=m68k-apollo
os=-sysv
;;
apollo68bsd)
basic_machine=m68k-apollo
os=-bsd
;;
aros)
basic_machine=i386-pc
os=-aros
;;
aux)
basic_machine=m68k-apple
os=-aux
;;
balance)
basic_machine=ns32k-sequent
os=-dynix
;;
blackfin)
basic_machine=bfin-unknown
os=-linux
;;
blackfin-*)
basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
os=-linux
;;
bluegene*)
basic_machine=powerpc-ibm
os=-cnk
;;
c54x-*)
basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
c55x-*)
basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
c6x-*)
basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
c90)
basic_machine=c90-cray
os=-unicos
;;
cegcc)
basic_machine=arm-unknown
os=-cegcc
;;
convex-c1)
basic_machine=c1-convex
os=-bsd
;;
convex-c2)
basic_machine=c2-convex
os=-bsd
;;
convex-c32)
basic_machine=c32-convex
os=-bsd
;;
convex-c34)
basic_machine=c34-convex
os=-bsd
;;
convex-c38)
basic_machine=c38-convex
os=-bsd
;;
cray | j90)
basic_machine=j90-cray
os=-unicos
;;
craynv)
basic_machine=craynv-cray
os=-unicosmp
;;
cr16 | cr16-*)
basic_machine=cr16-unknown
os=-elf
;;
crds | unos)
basic_machine=m68k-crds
;;
crisv32 | crisv32-* | etraxfs*)
basic_machine=crisv32-axis
;;
cris | cris-* | etrax*)
basic_machine=cris-axis
;;
crx)
basic_machine=crx-unknown
os=-elf
;;
da30 | da30-*)
basic_machine=m68k-da30
;;
decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
basic_machine=mips-dec
;;
decsystem10* | dec10*)
basic_machine=pdp10-dec
os=-tops10
;;
decsystem20* | dec20*)
basic_machine=pdp10-dec
os=-tops20
;;
delta | 3300 | motorola-3300 | motorola-delta \
| 3300-motorola | delta-motorola)
basic_machine=m68k-motorola
;;
delta88)
basic_machine=m88k-motorola
os=-sysv3
;;
dicos)
basic_machine=i686-pc
os=-dicos
;;
djgpp)
basic_machine=i586-pc
os=-msdosdjgpp
;;
dpx20 | dpx20-*)
basic_machine=rs6000-bull
os=-bosx
;;
dpx2* | dpx2*-bull)
basic_machine=m68k-bull
os=-sysv3
;;
ebmon29k)
basic_machine=a29k-amd
os=-ebmon
;;
elxsi)
basic_machine=elxsi-elxsi
os=-bsd
;;
encore | umax | mmax)
basic_machine=ns32k-encore
;;
es1800 | OSE68k | ose68k | ose | OSE)
basic_machine=m68k-ericsson
os=-ose
;;
fx2800)
basic_machine=i860-alliant
;;
genix)
basic_machine=ns32k-ns
;;
gmicro)
basic_machine=tron-gmicro
os=-sysv
;;
go32)
basic_machine=i386-pc
os=-go32
;;
h3050r* | hiux*)
basic_machine=hppa1.1-hitachi
os=-hiuxwe2
;;
h8300hms)
basic_machine=h8300-hitachi
os=-hms
;;
h8300xray)
basic_machine=h8300-hitachi
os=-xray
;;
h8500hms)
basic_machine=h8500-hitachi
os=-hms
;;
harris)
basic_machine=m88k-harris
os=-sysv3
;;
hp300-*)
basic_machine=m68k-hp
;;
hp300bsd)
basic_machine=m68k-hp
os=-bsd
;;
hp300hpux)
basic_machine=m68k-hp
os=-hpux
;;
hp3k9[0-9][0-9] | hp9[0-9][0-9])
basic_machine=hppa1.0-hp
;;
hp9k2[0-9][0-9] | hp9k31[0-9])
basic_machine=m68000-hp
;;
hp9k3[2-9][0-9])
basic_machine=m68k-hp
;;
hp9k6[0-9][0-9] | hp6[0-9][0-9])
basic_machine=hppa1.0-hp
;;
hp9k7[0-79][0-9] | hp7[0-79][0-9])
basic_machine=hppa1.1-hp
;;
hp9k78[0-9] | hp78[0-9])
# FIXME: really hppa2.0-hp
basic_machine=hppa1.1-hp
;;
hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
# FIXME: really hppa2.0-hp
basic_machine=hppa1.1-hp
;;
hp9k8[0-9][13679] | hp8[0-9][13679])
basic_machine=hppa1.1-hp
;;
hp9k8[0-9][0-9] | hp8[0-9][0-9])
basic_machine=hppa1.0-hp
;;
hppa-next)
os=-nextstep3
;;
hppaosf)
basic_machine=hppa1.1-hp
os=-osf
;;
hppro)
basic_machine=hppa1.1-hp
os=-proelf
;;
i370-ibm* | ibm*)
basic_machine=i370-ibm
;;
i*86v32)
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
os=-sysv32
;;
i*86v4*)
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
os=-sysv4
;;
i*86v)
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
os=-sysv
;;
i*86sol2)
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
os=-solaris2
;;
i386mach)
basic_machine=i386-mach
os=-mach
;;
i386-vsta | vsta)
basic_machine=i386-unknown
os=-vsta
;;
iris | iris4d)
basic_machine=mips-sgi
case $os in
-irix*)
;;
*)
os=-irix4
;;
esac
;;
isi68 | isi)
basic_machine=m68k-isi
os=-sysv
;;
m68knommu)
basic_machine=m68k-unknown
os=-linux
;;
m68knommu-*)
basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
os=-linux
;;
m88k-omron*)
basic_machine=m88k-omron
;;
magnum | m3230)
basic_machine=mips-mips
os=-sysv
;;
merlin)
basic_machine=ns32k-utek
os=-sysv
;;
microblaze*)
basic_machine=microblaze-xilinx
;;
mingw64)
basic_machine=x86_64-pc
os=-mingw64
;;
mingw32)
basic_machine=i686-pc
os=-mingw32
;;
mingw32ce)
basic_machine=arm-unknown
os=-mingw32ce
;;
miniframe)
basic_machine=m68000-convergent
;;
*mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
basic_machine=m68k-atari
os=-mint
;;
mips3*-*)
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
;;
mips3*)
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
;;
monitor)
basic_machine=m68k-rom68k
os=-coff
;;
morphos)
basic_machine=powerpc-unknown
os=-morphos
;;
msdos)
basic_machine=i386-pc
os=-msdos
;;
ms1-*)
basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
;;
msys)
basic_machine=i686-pc
os=-msys
;;
mvs)
basic_machine=i370-ibm
os=-mvs
;;
nacl)
basic_machine=le32-unknown
os=-nacl
;;
ncr3000)
basic_machine=i486-ncr
os=-sysv4
;;
netbsd386)
basic_machine=i386-unknown
os=-netbsd
;;
netwinder)
basic_machine=armv4l-rebel
os=-linux
;;
news | news700 | news800 | news900)
basic_machine=m68k-sony
os=-newsos
;;
news1000)
basic_machine=m68030-sony
os=-newsos
;;
news-3600 | risc-news)
basic_machine=mips-sony
os=-newsos
;;
necv70)
basic_machine=v70-nec
os=-sysv
;;
next | m*-next )
basic_machine=m68k-next
case $os in
-nextstep* )
;;
-ns2*)
os=-nextstep2
;;
*)
os=-nextstep3
;;
esac
;;
nh3000)
basic_machine=m68k-harris
os=-cxux
;;
nh[45]000)
basic_machine=m88k-harris
os=-cxux
;;
nindy960)
basic_machine=i960-intel
os=-nindy
;;
mon960)
basic_machine=i960-intel
os=-mon960
;;
nonstopux)
basic_machine=mips-compaq
os=-nonstopux
;;
np1)
basic_machine=np1-gould
;;
neo-tandem)
basic_machine=neo-tandem
;;
nse-tandem)
basic_machine=nse-tandem
;;
nsr-tandem)
basic_machine=nsr-tandem
;;
op50n-* | op60c-*)
basic_machine=hppa1.1-oki
os=-proelf
;;
openrisc | openrisc-*)
basic_machine=or32-unknown
;;
os400)
basic_machine=powerpc-ibm
os=-os400
;;
OSE68000 | ose68000)
basic_machine=m68000-ericsson
os=-ose
;;
os68k)
basic_machine=m68k-none
os=-os68k
;;
pa-hitachi)
basic_machine=hppa1.1-hitachi
os=-hiuxwe2
;;
paragon)
basic_machine=i860-intel
os=-osf
;;
parisc)
basic_machine=hppa-unknown
os=-linux
;;
parisc-*)
basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
os=-linux
;;
pbd)
basic_machine=sparc-tti
;;
pbb)
basic_machine=m68k-tti
;;
pc532 | pc532-*)
basic_machine=ns32k-pc532
;;
pc98)
basic_machine=i386-pc
;;
pc98-*)
basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pentium | p5 | k5 | k6 | nexgen | viac3)
basic_machine=i586-pc
;;
pentiumpro | p6 | 6x86 | athlon | athlon_*)
basic_machine=i686-pc
;;
pentiumii | pentium2 | pentiumiii | pentium3)
basic_machine=i686-pc
;;
pentium4)
basic_machine=i786-pc
;;
pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pentiumpro-* | p6-* | 6x86-* | athlon-*)
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pentium4-*)
basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pn)
basic_machine=pn-gould
;;
power) basic_machine=power-ibm
;;
ppc | ppcbe) basic_machine=powerpc-unknown
;;
ppc-* | ppcbe-*)
basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
ppcle | powerpclittle | ppc-le | powerpc-little)
basic_machine=powerpcle-unknown
;;
ppcle-* | powerpclittle-*)
basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
ppc64) basic_machine=powerpc64-unknown
;;
ppc64-* | ppc64p7-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
ppc64le | powerpc64little | ppc64-le | powerpc64-little)
basic_machine=powerpc64le-unknown
;;
ppc64le-* | powerpc64little-*)
basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
ps2)
basic_machine=i386-ibm
;;
pw32)
basic_machine=i586-unknown
os=-pw32
;;
rdos | rdos64)
basic_machine=x86_64-pc
os=-rdos
;;
rdos32)
basic_machine=i386-pc
os=-rdos
;;
rom68k)
basic_machine=m68k-rom68k
os=-coff
;;
rm[46]00)
basic_machine=mips-siemens
;;
rtpc | rtpc-*)
basic_machine=romp-ibm
;;
s390 | s390-*)
basic_machine=s390-ibm
;;
s390x | s390x-*)
basic_machine=s390x-ibm
;;
sa29200)
basic_machine=a29k-amd
os=-udi
;;
sb1)
basic_machine=mipsisa64sb1-unknown
;;
sb1el)
basic_machine=mipsisa64sb1el-unknown
;;
sde)
basic_machine=mipsisa32-sde
os=-elf
;;
sei)
basic_machine=mips-sei
os=-seiux
;;
sequent)
basic_machine=i386-sequent
;;
sh)
basic_machine=sh-hitachi
os=-hms
;;
sh5el)
basic_machine=sh5le-unknown
;;
sh64)
basic_machine=sh64-unknown
;;
sparclite-wrs | simso-wrs)
basic_machine=sparclite-wrs
os=-vxworks
;;
sps7)
basic_machine=m68k-bull
os=-sysv2
;;
spur)
basic_machine=spur-unknown
;;
st2000)
basic_machine=m68k-tandem
;;
stratus)
basic_machine=i860-stratus
os=-sysv4
;;
strongarm-* | thumb-*)
basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
sun2)
basic_machine=m68000-sun
;;
sun2os3)
basic_machine=m68000-sun
os=-sunos3
;;
sun2os4)
basic_machine=m68000-sun
os=-sunos4
;;
sun3os3)
basic_machine=m68k-sun
os=-sunos3
;;
sun3os4)
basic_machine=m68k-sun
os=-sunos4
;;
sun4os3)
basic_machine=sparc-sun
os=-sunos3
;;
sun4os4)
basic_machine=sparc-sun
os=-sunos4
;;
sun4sol2)
basic_machine=sparc-sun
os=-solaris2
;;
sun3 | sun3-*)
basic_machine=m68k-sun
;;
sun4)
basic_machine=sparc-sun
;;
sun386 | sun386i | roadrunner)
basic_machine=i386-sun
;;
sv1)
basic_machine=sv1-cray
os=-unicos
;;
symmetry)
basic_machine=i386-sequent
os=-dynix
;;
t3e)
basic_machine=alphaev5-cray
os=-unicos
;;
t90)
basic_machine=t90-cray
os=-unicos
;;
tile*)
basic_machine=$basic_machine-unknown
os=-linux-gnu
;;
tx39)
basic_machine=mipstx39-unknown
;;
tx39el)
basic_machine=mipstx39el-unknown
;;
toad1)
basic_machine=pdp10-xkl
os=-tops20
;;
tower | tower-32)
basic_machine=m68k-ncr
;;
tpf)
basic_machine=s390x-ibm
os=-tpf
;;
udi29k)
basic_machine=a29k-amd
os=-udi
;;
ultra3)
basic_machine=a29k-nyu
os=-sym1
;;
v810 | necv810)
basic_machine=v810-nec
os=-none
;;
vaxv)
basic_machine=vax-dec
os=-sysv
;;
vms)
basic_machine=vax-dec
os=-vms
;;
vpp*|vx|vx-*)
basic_machine=f301-fujitsu
;;
vxworks960)
basic_machine=i960-wrs
os=-vxworks
;;
vxworks68)
basic_machine=m68k-wrs
os=-vxworks
;;
vxworks29k)
basic_machine=a29k-wrs
os=-vxworks
;;
w65*)
basic_machine=w65-wdc
os=-none
;;
w89k-*)
basic_machine=hppa1.1-winbond
os=-proelf
;;
xbox)
basic_machine=i686-pc
os=-mingw32
;;
xps | xps100)
basic_machine=xps100-honeywell
;;
xscale-* | xscalee[bl]-*)
basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
;;
ymp)
basic_machine=ymp-cray
os=-unicos
;;
z8k-*-coff)
basic_machine=z8k-unknown
os=-sim
;;
z80-*-coff)
basic_machine=z80-unknown
os=-sim
;;
none)
basic_machine=none-none
os=-none
;;
# Here we handle the default manufacturer of certain CPU types. It is in
# some cases the only manufacturer, in others, it is the most popular.
w89k)
basic_machine=hppa1.1-winbond
;;
op50n)
basic_machine=hppa1.1-oki
;;
op60c)
basic_machine=hppa1.1-oki
;;
romp)
basic_machine=romp-ibm
;;
mmix)
basic_machine=mmix-knuth
;;
rs6000)
basic_machine=rs6000-ibm
;;
vax)
basic_machine=vax-dec
;;
pdp10)
# there are many clones, so DEC is not a safe bet
basic_machine=pdp10-unknown
;;
pdp11)
basic_machine=pdp11-dec
;;
we32k)
basic_machine=we32k-att
;;
sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
basic_machine=sh-unknown
;;
sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
basic_machine=sparc-sun
;;
cydra)
basic_machine=cydra-cydrome
;;
orion)
basic_machine=orion-highlevel
;;
orion105)
basic_machine=clipper-highlevel
;;
mac | mpw | mac-mpw)
basic_machine=m68k-apple
;;
pmac | pmac-mpw)
basic_machine=powerpc-apple
;;
*-unknown)
# Make sure to match an already-canonicalized machine name.
;;
*)
echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
exit 1
;;
esac
# Here we canonicalize certain aliases for manufacturers.
case $basic_machine in
*-digital*)
basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
;;
*-commodore*)
basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
;;
*)
;;
esac
# Decode manufacturer-specific aliases for certain operating systems.
if [ x"$os" != x"" ]
then
case $os in
# First match some system type aliases
# that might get confused with valid system types.
# -solaris* is a basic system type, with this one exception.
-auroraux)
os=-auroraux
;;
-solaris1 | -solaris1.*)
os=`echo $os | sed -e 's|solaris1|sunos4|'`
;;
-solaris)
os=-solaris2
;;
-svr4*)
os=-sysv4
;;
-unixware*)
os=-sysv4.2uw
;;
-gnu/linux*)
os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
;;
# First accept the basic system types.
# The portable systems comes first.
# Each alternative MUST END IN A *, to match a version number.
# -sysv* is not here because it comes later, after sysvr4.
-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
| -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
| -sym* | -kopensolaris* | -plan9* \
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
| -aos* | -aros* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
| -bitrig* | -openbsd* | -solidbsd* \
| -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
| -chorusos* | -chorusrdb* | -cegcc* \
| -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
| -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
| -linux-newlib* | -linux-musl* | -linux-uclibc* \
| -uxpv* | -beos* | -mpeix* | -udk* \
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
| -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
case $basic_machine in
x86-* | i*86-*)
;;
*)
os=-nto$os
;;
esac
;;
-nto-qnx*)
;;
-nto*)
os=`echo $os | sed -e 's|nto|nto-qnx|'`
;;
-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
| -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
| -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
;;
-mac*)
os=`echo $os | sed -e 's|mac|macos|'`
;;
-linux-dietlibc)
os=-linux-dietlibc
;;
-linux*)
os=`echo $os | sed -e 's|linux|linux-gnu|'`
;;
-sunos5*)
os=`echo $os | sed -e 's|sunos5|solaris2|'`
;;
-sunos6*)
os=`echo $os | sed -e 's|sunos6|solaris3|'`
;;
-opened*)
os=-openedition
;;
-os400*)
os=-os400
;;
-wince*)
os=-wince
;;
-osfrose*)
os=-osfrose
;;
-osf*)
os=-osf
;;
-utek*)
os=-bsd
;;
-dynix*)
os=-bsd
;;
-acis*)
os=-aos
;;
-atheos*)
os=-atheos
;;
-syllable*)
os=-syllable
;;
-386bsd)
os=-bsd
;;
-ctix* | -uts*)
os=-sysv
;;
-nova*)
os=-rtmk-nova
;;
-ns2 )
os=-nextstep2
;;
-nsk*)
os=-nsk
;;
# Preserve the version number of sinix5.
-sinix5.*)
os=`echo $os | sed -e 's|sinix|sysv|'`
;;
-sinix*)
os=-sysv4
;;
-tpf*)
os=-tpf
;;
-triton*)
os=-sysv3
;;
-oss*)
os=-sysv3
;;
-svr4)
os=-sysv4
;;
-svr3)
os=-sysv3
;;
-sysvr4)
os=-sysv4
;;
# This must come after -sysvr4.
-sysv*)
;;
-ose*)
os=-ose
;;
-es1800*)
os=-ose
;;
-xenix)
os=-xenix
;;
-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
os=-mint
;;
-aros*)
os=-aros
;;
-zvmoe)
os=-zvmoe
;;
-dicos*)
os=-dicos
;;
-nacl*)
;;
-none)
;;
*)
# Get rid of the `-' at the beginning of $os.
os=`echo $os | sed 's/[^-]*-//'`
echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
exit 1
;;
esac
else
# Here we handle the default operating systems that come with various machines.
# The value should be what the vendor currently ships out the door with their
# machine or put another way, the most popular os provided with the machine.
# Note that if you're going to try to match "-MANUFACTURER" here (say,
# "-sun"), then you have to tell the case statement up towards the top
# that MANUFACTURER isn't an operating system. Otherwise, code above
# will signal an error saying that MANUFACTURER isn't an operating
# system, and we'll never get to this point.
case $basic_machine in
score-*)
os=-elf
;;
spu-*)
os=-elf
;;
*-acorn)
os=-riscix1.2
;;
arm*-rebel)
os=-linux
;;
arm*-semi)
os=-aout
;;
c4x-* | tic4x-*)
os=-coff
;;
c8051-*)
os=-elf
;;
hexagon-*)
os=-elf
;;
tic54x-*)
os=-coff
;;
tic55x-*)
os=-coff
;;
tic6x-*)
os=-coff
;;
# This must come before the *-dec entry.
pdp10-*)
os=-tops20
;;
pdp11-*)
os=-none
;;
*-dec | vax-*)
os=-ultrix4.2
;;
m68*-apollo)
os=-domain
;;
i386-sun)
os=-sunos4.0.2
;;
m68000-sun)
os=-sunos3
;;
m68*-cisco)
os=-aout
;;
mep-*)
os=-elf
;;
mips*-cisco)
os=-elf
;;
mips*-*)
os=-elf
;;
or1k-*)
os=-elf
;;
or32-*)
os=-coff
;;
*-tti) # must be before sparc entry or we get the wrong os.
os=-sysv3
;;
sparc-* | *-sun)
os=-sunos4.1.1
;;
*-be)
os=-beos
;;
*-haiku)
os=-haiku
;;
*-ibm)
os=-aix
;;
*-knuth)
os=-mmixware
;;
*-wec)
os=-proelf
;;
*-winbond)
os=-proelf
;;
*-oki)
os=-proelf
;;
*-hp)
os=-hpux
;;
*-hitachi)
os=-hiux
;;
i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
os=-sysv
;;
*-cbm)
os=-amigaos
;;
*-dg)
os=-dgux
;;
*-dolphin)
os=-sysv3
;;
m68k-ccur)
os=-rtu
;;
m88k-omron*)
os=-luna
;;
*-next )
os=-nextstep
;;
*-sequent)
os=-ptx
;;
*-crds)
os=-unos
;;
*-ns)
os=-genix
;;
i370-*)
os=-mvs
;;
*-next)
os=-nextstep3
;;
*-gould)
os=-sysv
;;
*-highlevel)
os=-bsd
;;
*-encore)
os=-bsd
;;
*-sgi)
os=-irix
;;
*-siemens)
os=-sysv4
;;
*-masscomp)
os=-rtu
;;
f30[01]-fujitsu | f700-fujitsu)
os=-uxpv
;;
*-rom68k)
os=-coff
;;
*-*bug)
os=-coff
;;
*-apple)
os=-macos
;;
*-atari*)
os=-mint
;;
*)
os=-none
;;
esac
fi
# Here we handle the case where we know the os, and the CPU type, but not the
# manufacturer. We pick the logical manufacturer.
vendor=unknown
case $basic_machine in
*-unknown)
case $os in
-riscix*)
vendor=acorn
;;
-sunos*)
vendor=sun
;;
-cnk*|-aix*)
vendor=ibm
;;
-beos*)
vendor=be
;;
-hpux*)
vendor=hp
;;
-mpeix*)
vendor=hp
;;
-hiux*)
vendor=hitachi
;;
-unos*)
vendor=crds
;;
-dgux*)
vendor=dg
;;
-luna*)
vendor=omron
;;
-genix*)
vendor=ns
;;
-mvs* | -opened*)
vendor=ibm
;;
-os400*)
vendor=ibm
;;
-ptx*)
vendor=sequent
;;
-tpf*)
vendor=ibm
;;
-vxsim* | -vxworks* | -windiss*)
vendor=wrs
;;
-aux*)
vendor=apple
;;
-hms*)
vendor=hitachi
;;
-mpw* | -macos*)
vendor=apple
;;
-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
vendor=atari
;;
-vos*)
vendor=stratus
;;
esac
basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
;;
esac
echo $basic_machine$os
exit
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "timestamp='"
# time-stamp-format: "%:y-%02m-%02d"
# time-stamp-end: "'"
# End:
astra-toolbox-2.3.0/build/linux/configure.ac 0000664 0000000 0000000 00000024463 14756352071 0021061 0 ustar 00root root 0000000 0000000 dnl -----------------------------------------------------------------------
dnl Copyright: 2010-2022, imec Vision Lab, University of Antwerp
dnl 2014-2022, CWI, Amsterdam
dnl
dnl Contact: astra@astra-toolbox.com
dnl Website: http://www.astra-toolbox.com/
dnl
dnl This file is part of the ASTRA Toolbox.
dnl
dnl
dnl The ASTRA Toolbox is free software: you can redistribute it and/or modify
dnl it under the terms of the GNU General Public License as published by
dnl the Free Software Foundation, either version 3 of the License, or
dnl (at your option) any later version.
dnl
dnl The ASTRA Toolbox is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
dnl GNU General Public License for more details.
dnl
dnl You should have received a copy of the GNU General Public License
dnl along with the ASTRA Toolbox. If not, see .
dnl
dnl -----------------------------------------------------------------------
AC_INIT([astra],[2.3.0])
AC_CONFIG_SRCDIR([Makefile.in])
LT_INIT([disable-static])
SAVED_CPPFLAGS="$CPPFLAGS"
SAVED_CXXFLAGS="$CXXFLAGS"
SAVED_NVCCFLAGS="$NVCCFLAGS"
SAVED_LDFLAGS="$LDFLAGS"
SAVED_LIBS="$LIBS"
AC_CANONICAL_BUILD
AC_CANONICAL_HOST
AC_PROG_CC
AC_PROG_CXX
AC_PROG_INSTALL
AC_PROG_MAKE_SET
AC_LANG([C++])
dnl Use iostream to check if the C++ compiler works
AC_CHECK_HEADER(iostream, , AC_MSG_ERROR([No working c++ compiler found]))
# boost-unit-test-framework
AC_MSG_CHECKING([for boost-unit-test-framework])
ASTRA_CHECK_BOOST_UNIT_TEST_FRAMEWORK(-lboost_unit_test_framework-mt, BOOSTUTF=yes_mt, BOOSTUTF=no)
HAVEBOOSTUTF=no
if test x$BOOSTUTF = xno; then
ASTRA_CHECK_BOOST_UNIT_TEST_FRAMEWORK(-lboost_unit_test_framework, BOOSTUTF=yes, BOOSTUTF=no)
if test x$BOOSTUTF = xno; then
AC_MSG_RESULT(no)
else
AC_MSG_RESULT([yes, libboost_unit_test_framework])
LIBS_BOOSTUTF="-lboost_unit_test_framework"
HAVEBOOSTUTF=yes
fi
else
AC_MSG_RESULT([yes, libboost_unit_test_framework-mt])
LIBS_BOOSTUTF="-lboost_unit_test_framework-mt"
HAVEBOOSTUTF=yes
fi
AC_SUBST(HAVEBOOSTUTF)
AC_SUBST(LIBS_BOOSTUTF)
# nvcc, cuda
AC_ARG_WITH(cuda, [[ --with-cuda=path path of CUDA (optional)]],,)
if test x"$with_cuda" != xno; then
NVCC_PATH=$PATH
if test x"$with_cuda" != x -a x"$with_cuda" != xyes; then
NVCC_PATH="$with_cuda/bin:$NVCC_PATH"
fi
AC_PATH_PROG([NVCC], [nvcc], [no], [$NVCC_PATH])
else
NVCC=no
fi
HAVECUDA=no
if test x"$NVCC" != xno; then
HAVECUDA=yes
BACKUP_CUDA_LDFLAGS="$LDFLAGS"
if test x"$with_cuda" != x -a x"$with_cuda" != xyes; then
test -d $with_cuda/lib64 && LDFLAGS_CUDA="-L$with_cuda/lib64" || LDFLAGS_CUDA="-L$with_cuda/lib"
CPPFLAGS_CUDA="-I$with_cuda/include"
LDFLAGS="$LDFLAGS $LDFLAGS_CUDA"
fi
AC_CHECK_LIB(cudart,cudaMalloc, ,HAVECUDA=no)
AC_CHECK_LIB(cufft,cufftPlan1d, ,HAVECUDA=no)
LDFLAGS="$BACKUP_CUDA_LDFLAGS"
unset BACKUP_CUDA_LDFLAGS
# TODO: check for cuda headers?
AC_SUBST(NVCC)
fi
if test x"$HAVECUDA" = xyes; then
AC_MSG_CHECKING([if nvcc works])
ASTRA_CHECK_NVCC(HAVECUDA,NVCCFLAGS_EXTRA)
AC_MSG_RESULT($HAVECUDA)
fi
AC_ARG_WITH(cuda_compute, [[ --with-cuda-compute=archs comma separated list of CUDA compute models (optional)]],,)
if test x"$HAVECUDA" = xyes; then
AC_MSG_CHECKING([for nvcc archs])
dnl 10 11 12 13 20 21 30 32 35 37 50 52 53 60 61 62 70 72 75 80 86
dnl
dnl Build cubin for range of platforms, and ptx for newest for forward compat.
dnl Build cubin x.0 for older platforms, and all x.y for "recent" ones.
dnl
dnl Include 3.5 since CUDA 11.x doesn't support 3.0, but does support 3.5.
dnl (All other CUDA toolkits from 7-10 start support at x.0 versions.)
dnl Skip 7.2 cubin since that seems to be Jetson-only (and can use 7.0 cubin).
dnl
dnl From CUDA Programming Guide:
dnl "Binary compatibility is guaranteed from one minor revision to the next one, but not from one minor revision to the previous one or across major revisions."
dnl
if test x"$with_cuda_compute" = x; then
with_cuda_compute="20,30,35,50,60,70,75,80,86"
fi
ASTRA_FIND_NVCC_ARCHS([$with_cuda_compute],NVCCFLAGS_EXTRA,NVCCARCHS)
AC_MSG_RESULT([$NVCCARCHS])
fi
AC_ARG_VAR(NVCCFLAGS, [CUDA nvcc flags])
PKGCONFIG_CFLAGS_EXTRA=
if test x"$HAVECUDA" = xyes; then
PKGCONFIG_CFLAGS_EXTRA="-DASTRA_CUDA"
fi
AC_SUBST(PKGCONFIG_CFLAGS_EXTRA)
AC_SUBST(HAVECUDA)
AC_SUBST(LDFLAGS_CUDA)
AC_SUBST(CPPFLAGS_CUDA)
AC_SUBST(NVCCFLAGS_EXTRA)
# mex, matlab
AC_ARG_WITH(matlab, [[ --with-matlab=path path of Matlab (optional)]],,)
MEX_PATH=$PATH
HAVEMATLAB=no
if test x"$with_matlab" != x; then
MEX_PATH="$with_matlab/bin:$MEX_PATH"
AC_PATH_PROG([MEX], [mex], [no], [$MEX_PATH])
if test x"$MEX" != xno; then
HAVEMATLAB=yes
# TODO: check platform of C compiler is same as mex
AC_SUBST(MEX)
MATLAB_ROOT="$with_matlab"
AC_SUBST(MATLAB_ROOT)
# TODO: maybe catch mex warnings
ASTRA_CHECK_MEX_SUFFIX([mexa64 mexglx mexmaci64 mexmaci],[MEXSUFFIX])
if test x$MEXSUFFIX = x; then
AC_MSG_FAILURE([Unable to determine matlab mex suffix])
HAVEMATLAB=no
fi
AC_SUBST(MEXSUFFIX)
fi
fi
if test x"$HAVEMATLAB" = xyes; then
AC_MSG_CHECKING([if mex requires the -R2017b option])
ASTRA_CHECK_MEX_OPTION([-R2017b],[$MEXSUFFIX],[
MEXFLAGS="-R2017b"
# TODO: check if this is the best way of emulating -R2017b when using
# CXX directly to compile mex files.
CPPFLAGS_MATLAB="-DMATLAB_MEXCMD_RELEASE=700"
AC_MSG_RESULT([yes])
],[
MEXFLAGS=
CPPFLAGS_MATLAB=
AC_MSG_RESULT([no])
])
fi
AC_SUBST(HAVEMATLAB)
AC_SUBST(MEXFLAGS)
AC_SUBST(CPPFLAGS_MATLAB)
# octave
AC_ARG_ENABLE(octave, [[ --enable-octave enable Octave support]])
if test x"$enable_octave" = xyes; then
AC_PATH_PROG([HAVEOCTAVE], [octave-config], [no], [$PATH])
AC_MSG_CHECKING([for octave])
if test x"HAVEOCTAVE" != xno -a $HAVEMATLAB = yes; then
HAVEOCTAVE=no
AC_MSG_RESULT([no (since Matlab support is enabled)])
else
if test x"$HAVEOCTAVE" != xno; then
OCTAVE_CPPFLAGS="-I`octave-config -p OCTINCLUDEDIR`"
AC_SUBST(OCTAVE_CPPFLAGS)
HAVEOCTAVE=yes
fi
AC_MSG_RESULT($HAVEOCTAVE)
fi
else
HAVEOCTAVE=no
fi
AC_SUBST(HAVEOCTAVE)
# python
AC_ARG_WITH(python, [[ --with-python=path path of Python binary (optional)]],,)
HAVEPYTHON=no
if test x"$with_python" != x -a x"$with_python" != xno; then
if test x"$with_python" = xyes; then
PYTHON=python
else
PYTHON="$with_python"
fi
AC_MSG_CHECKING(for python)
ASTRA_RUN_LOGOUTPUT(echo 'import sys' | $PYTHON -)
if test $? -ne 0; then
AC_MSG_ERROR(Python binary not found)
fi
AC_MSG_RESULT([$PYTHON])
HAVEPYTHON=yes
AC_SUBST(PYTHON)
AC_MSG_CHECKING(for numpy module)
ASTRA_TRY_PYTHON([import numpy],,HAVEPYTHON=no)
if test x$HAVEPYTHON = xno; then
AC_MSG_RESULT(no)
AC_MSG_ERROR(You need the numpy module to use the ASTRA toolbox in Python)
fi
AC_MSG_RESULT(yes)
AC_MSG_CHECKING(for Cython module)
ASTRA_TRY_PYTHON([import Cython],,HAVEPYTHON=no)
if test x$HAVEPYTHON = xno; then
AC_MSG_RESULT(no)
AC_MSG_ERROR(You need the Cython module to use the ASTRA toolbox in Python)
fi
AC_MSG_RESULT(yes)
AC_MSG_CHECKING(for scipy module)
ASTRA_TRY_PYTHON([import scipy],,HAVEPYTHON=no)
if test x$HAVEPYTHON = xno; then
AC_MSG_RESULT(no)
AC_MSG_ERROR(You need the scipy module to use the ASTRA toolbox in Python)
fi
AC_MSG_RESULT(yes)
fi
AC_SUBST(HAVEPYTHON)
AC_ARG_WITH(python-wheel-platform, [[ --with-python-wheel-platform=platform platform name to use for .whl (optional)]],,)
PYTHON_WHEEL_PLATFORM=
AC_MSG_CHECKING(for platform name to use for Python wheel)
if test x"$with_python_wheel_platform" != x -a x"$with_python_wheel_platform" != xno; then
PYTHON_WHEEL_PLATFORM=$with_python_wheel_platform
AC_MSG_RESULT($PYTHON_WHEEL_PLATFORM)
else
AC_MSG_RESULT(default)
fi
AC_SUBST(PYTHON_WHEEL_PLATFORM)
#OS specific setup
AC_CANONICAL_HOST
case $host_os in
darwin* )
CXXFLAGS_OS="-stdlib=libstdc++ -mmacosx-version-min=10.6"
LDFLAGS_OS="-stdlib=libstdc++"
IS_MACOS=yes
;;
*)
CXXFLAGS_OS=""
LDFLAGS_OS=""
IS_MACOS=no
;;
esac
AC_SUBST(CXXFLAGS_OS)
AC_SUBST(LDFLAGS_OS)
AC_SUBST(IS_MACOS)
# For some reason, some older versions of autoconf produce a config.status
# that disables all lines looking like VPATH=@srcdir@
# (More recent autoconf fixes the too broad matching there.)
# We use a different variable name as a workaround.
VPATH_SRCDIR="$srcdir"
AC_SUBST(VPATH_SRCDIR)
# Installation type
AC_ARG_WITH(install-type, [[ --with-install-type=prefix|module|dir type of installation (default prefix)]],,with_install_type=prefix)
INSTALL_TYPE=$with_install_type
AC_SUBST(INSTALL_TYPE)
# TODO:
# Detection of tools:
# libtool (how?)
# options:
# debugging/optimization/profiling flags
AC_SUBST(SAVED_CPPFLAGS)
AC_SUBST(SAVED_CXXFLAGS)
AC_SUBST(SAVED_NVCCFLAGS)
AC_SUBST(SAVED_LDFLAGS)
AC_SUBST(SAVED_LIBS)
AC_CONFIG_FILES([Makefile libastra.pc])
AC_OUTPUT
echo
echo "Summary of ASTRA Toolbox build options:"
echo " CUDA : $HAVECUDA"
echo " Matlab: $HAVEMATLAB"
echo " Octave: $HAVEOCTAVE"
echo " Python: $HAVEPYTHON"
echo
echo "Installation type: $with_install_type"
case $with_install_type in
prefix)
echo " Library : "$(eval echo `eval echo $libdir`)
if test $HAVEMATLAB = yes; then
echo " Matlab files: "$(eval echo `eval echo $datadir`)"/astra/matlab"
fi
if test $HAVEOCTAVE = yes; then
echo " Octave files: "$(eval echo `eval echo $datadir`)"/astra/octave"
fi
if test $HAVEPYTHON = yes; then
echo " Python files to site-packages"
fi
;;
dir)
echo " Library : "$(eval echo `eval echo $libdir`)
if test $HAVEMATLAB = yes; then
echo " Matlab files: $prefix/matlab"
fi
if test $HAVEOCTAVE = yes; then
echo " Octave files: $prefix/octave"
fi
if test $HAVEPYTHON = yes; then
echo " Python files: $prefix/python"
fi
;;
module)
echo " Library into Matlab/Octave/Python module directories"
if test $HAVEMATLAB = yes; then
echo " Matlab files: $prefix/matlab"
fi
if test $HAVEOCTAVE = yes; then
echo " Octave files: $prefix/octave"
fi
if test $HAVEPYTHON = yes; then
echo " Python files to site-packages"
fi
esac
astra-toolbox-2.3.0/build/linux/install-sh.dist 0000775 0000000 0000000 00000033256 14756352071 0021541 0 ustar 00root root 0000000 0000000 #!/bin/sh
# install - install a program, script, or datafile
scriptversion=2011-01-19.21; # UTC
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
# following copyright and license.
#
# Copyright (C) 1994 X Consortium
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
# sell copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# 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
# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
# Except as contained in this notice, the name of the X Consortium shall not
# be used in advertising or otherwise to promote the sale, use or other deal-
# ings in this Software without prior written authorization from the X Consor-
# tium.
#
#
# FSF changes to this file are in the public domain.
#
# Calling this script install-sh is preferred over install.sh, to prevent
# `make' implicit rules from creating a file called install from it
# when there is no Makefile.
#
# This script is compatible with the BSD install script, but was written
# from scratch.
nl='
'
IFS=" "" $nl"
# set DOITPROG to echo to test this script
# Don't use :- since 4.3BSD and earlier shells don't like it.
doit=${DOITPROG-}
if test -z "$doit"; then
doit_exec=exec
else
doit_exec=$doit
fi
# Put in absolute file names if you don't have them in your path;
# or use environment vars.
chgrpprog=${CHGRPPROG-chgrp}
chmodprog=${CHMODPROG-chmod}
chownprog=${CHOWNPROG-chown}
cmpprog=${CMPPROG-cmp}
cpprog=${CPPROG-cp}
mkdirprog=${MKDIRPROG-mkdir}
mvprog=${MVPROG-mv}
rmprog=${RMPROG-rm}
stripprog=${STRIPPROG-strip}
posix_glob='?'
initialize_posix_glob='
test "$posix_glob" != "?" || {
if (set -f) 2>/dev/null; then
posix_glob=
else
posix_glob=:
fi
}
'
posix_mkdir=
# Desired mode of installed file.
mode=0755
chgrpcmd=
chmodcmd=$chmodprog
chowncmd=
mvcmd=$mvprog
rmcmd="$rmprog -f"
stripcmd=
src=
dst=
dir_arg=
dst_arg=
copy_on_change=false
no_target_directory=
usage="\
Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
or: $0 [OPTION]... SRCFILES... DIRECTORY
or: $0 [OPTION]... -t DIRECTORY SRCFILES...
or: $0 [OPTION]... -d DIRECTORIES...
In the 1st form, copy SRCFILE to DSTFILE.
In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
In the 4th, create DIRECTORIES.
Options:
--help display this help and exit.
--version display version info and exit.
-c (ignored)
-C install only if different (preserve the last data modification time)
-d create directories instead of installing files.
-g GROUP $chgrpprog installed files to GROUP.
-m MODE $chmodprog installed files to MODE.
-o USER $chownprog installed files to USER.
-s $stripprog installed files.
-t DIRECTORY install into DIRECTORY.
-T report an error if DSTFILE is a directory.
Environment variables override the default commands:
CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
RMPROG STRIPPROG
"
while test $# -ne 0; do
case $1 in
-c) ;;
-C) copy_on_change=true;;
-d) dir_arg=true;;
-g) chgrpcmd="$chgrpprog $2"
shift;;
--help) echo "$usage"; exit $?;;
-m) mode=$2
case $mode in
*' '* | *' '* | *'
'* | *'*'* | *'?'* | *'['*)
echo "$0: invalid mode: $mode" >&2
exit 1;;
esac
shift;;
-o) chowncmd="$chownprog $2"
shift;;
-s) stripcmd=$stripprog;;
-t) dst_arg=$2
# Protect names problematic for `test' and other utilities.
case $dst_arg in
-* | [=\(\)!]) dst_arg=./$dst_arg;;
esac
shift;;
-T) no_target_directory=true;;
--version) echo "$0 $scriptversion"; exit $?;;
--) shift
break;;
-*) echo "$0: invalid option: $1" >&2
exit 1;;
*) break;;
esac
shift
done
if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
# When -d is used, all remaining arguments are directories to create.
# When -t is used, the destination is already specified.
# Otherwise, the last argument is the destination. Remove it from $@.
for arg
do
if test -n "$dst_arg"; then
# $@ is not empty: it contains at least $arg.
set fnord "$@" "$dst_arg"
shift # fnord
fi
shift # arg
dst_arg=$arg
# Protect names problematic for `test' and other utilities.
case $dst_arg in
-* | [=\(\)!]) dst_arg=./$dst_arg;;
esac
done
fi
if test $# -eq 0; then
if test -z "$dir_arg"; then
echo "$0: no input file specified." >&2
exit 1
fi
# It's OK to call `install-sh -d' without argument.
# This can happen when creating conditional directories.
exit 0
fi
if test -z "$dir_arg"; then
do_exit='(exit $ret); exit $ret'
trap "ret=129; $do_exit" 1
trap "ret=130; $do_exit" 2
trap "ret=141; $do_exit" 13
trap "ret=143; $do_exit" 15
# Set umask so as not to create temps with too-generous modes.
# However, 'strip' requires both read and write access to temps.
case $mode in
# Optimize common cases.
*644) cp_umask=133;;
*755) cp_umask=22;;
*[0-7])
if test -z "$stripcmd"; then
u_plus_rw=
else
u_plus_rw='% 200'
fi
cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
*)
if test -z "$stripcmd"; then
u_plus_rw=
else
u_plus_rw=,u+rw
fi
cp_umask=$mode$u_plus_rw;;
esac
fi
for src
do
# Protect names problematic for `test' and other utilities.
case $src in
-* | [=\(\)!]) src=./$src;;
esac
if test -n "$dir_arg"; then
dst=$src
dstdir=$dst
test -d "$dstdir"
dstdir_status=$?
else
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
# might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'.
if test ! -f "$src" && test ! -d "$src"; then
echo "$0: $src does not exist." >&2
exit 1
fi
if test -z "$dst_arg"; then
echo "$0: no destination specified." >&2
exit 1
fi
dst=$dst_arg
# If destination is a directory, append the input filename; won't work
# if double slashes aren't ignored.
if test -d "$dst"; then
if test -n "$no_target_directory"; then
echo "$0: $dst_arg: Is a directory" >&2
exit 1
fi
dstdir=$dst
dst=$dstdir/`basename "$src"`
dstdir_status=0
else
# Prefer dirname, but fall back on a substitute if dirname fails.
dstdir=`
(dirname "$dst") 2>/dev/null ||
expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$dst" : 'X\(//\)[^/]' \| \
X"$dst" : 'X\(//\)$' \| \
X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
echo X"$dst" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
}
/^X\(\/\/\)[^/].*/{
s//\1/
q
}
/^X\(\/\/\)$/{
s//\1/
q
}
/^X\(\/\).*/{
s//\1/
q
}
s/.*/./; q'
`
test -d "$dstdir"
dstdir_status=$?
fi
fi
obsolete_mkdir_used=false
if test $dstdir_status != 0; then
case $posix_mkdir in
'')
# Create intermediate dirs using mode 755 as modified by the umask.
# This is like FreeBSD 'install' as of 1997-10-28.
umask=`umask`
case $stripcmd.$umask in
# Optimize common cases.
*[2367][2367]) mkdir_umask=$umask;;
.*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
*[0-7])
mkdir_umask=`expr $umask + 22 \
- $umask % 100 % 40 + $umask % 20 \
- $umask % 10 % 4 + $umask % 2
`;;
*) mkdir_umask=$umask,go-w;;
esac
# With -d, create the new directory with the user-specified mode.
# Otherwise, rely on $mkdir_umask.
if test -n "$dir_arg"; then
mkdir_mode=-m$mode
else
mkdir_mode=
fi
posix_mkdir=false
case $umask in
*[123567][0-7][0-7])
# POSIX mkdir -p sets u+wx bits regardless of umask, which
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
;;
*)
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
if (umask $mkdir_umask &&
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
then
if test -z "$dir_arg" || {
# Check for POSIX incompatibilities with -m.
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
# other-writeable bit of parent directory when it shouldn't.
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
ls_ld_tmpdir=`ls -ld "$tmpdir"`
case $ls_ld_tmpdir in
d????-?r-*) different_mode=700;;
d????-?--*) different_mode=755;;
*) false;;
esac &&
$mkdirprog -m$different_mode -p -- "$tmpdir" && {
ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
}
}
then posix_mkdir=:
fi
rmdir "$tmpdir/d" "$tmpdir"
else
# Remove any dirs left behind by ancient mkdir implementations.
rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
fi
trap '' 0;;
esac;;
esac
if
$posix_mkdir && (
umask $mkdir_umask &&
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
)
then :
else
# The umask is ridiculous, or mkdir does not conform to POSIX,
# or it failed possibly due to a race condition. Create the
# directory the slow way, step by step, checking for races as we go.
case $dstdir in
/*) prefix='/';;
[-=\(\)!]*) prefix='./';;
*) prefix='';;
esac
eval "$initialize_posix_glob"
oIFS=$IFS
IFS=/
$posix_glob set -f
set fnord $dstdir
shift
$posix_glob set +f
IFS=$oIFS
prefixes=
for d
do
test X"$d" = X && continue
prefix=$prefix$d
if test -d "$prefix"; then
prefixes=
else
if $posix_mkdir; then
(umask=$mkdir_umask &&
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
# Don't fail if two instances are running concurrently.
test -d "$prefix" || exit 1
else
case $prefix in
*\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
*) qprefix=$prefix;;
esac
prefixes="$prefixes '$qprefix'"
fi
fi
prefix=$prefix/
done
if test -n "$prefixes"; then
# Don't fail if two instances are running concurrently.
(umask $mkdir_umask &&
eval "\$doit_exec \$mkdirprog $prefixes") ||
test -d "$dstdir" || exit 1
obsolete_mkdir_used=true
fi
fi
fi
if test -n "$dir_arg"; then
{ test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
{ test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
else
# Make a couple of temp file names in the proper directory.
dsttmp=$dstdir/_inst.$$_
rmtmp=$dstdir/_rm.$$_
# Trap to clean up those temp files at exit.
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
# Copy the file name to the temp name.
(umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
# and set any options; do chmod last to preserve setuid bits.
#
# If any of these fail, we abort the whole thing. If we want to
# ignore errors from any of these, just make sure not to ignore
# errors from the above "$doit $cpprog $src $dsttmp" command.
#
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
{ test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
{ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
# If -C, don't bother to copy if it wouldn't change the file.
if $copy_on_change &&
old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
eval "$initialize_posix_glob" &&
$posix_glob set -f &&
set X $old && old=:$2:$4:$5:$6 &&
set X $new && new=:$2:$4:$5:$6 &&
$posix_glob set +f &&
test "$old" = "$new" &&
$cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
then
rm -f "$dsttmp"
else
# Rename the file to the real destination.
$doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
# The rename failed, perhaps because mv can't rename something else
# to itself, or perhaps because mv is so ancient that it does not
# support -f.
{
# Now remove or move aside any old file at destination location.
# We try this two ways since rm can't unlink itself on some
# systems and the destination file might be busy for other
# reasons. In this case, the final cleanup might fail but the new
# file should still install successfully.
{
test ! -f "$dst" ||
$doit $rmcmd -f "$dst" 2>/dev/null ||
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
{ $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
} ||
{ echo "$0: cannot unlink or rename $dst" >&2
(exit 1); exit 1
}
} &&
# Now rename the file to the real destination.
$doit $mvcmd "$dsttmp" "$dst"
}
fi || exit 1
trap '' 0
fi
done
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC"
# time-stamp-end: "; # UTC"
# End:
astra-toolbox-2.3.0/build/linux/libastra.pc.in 0000664 0000000 0000000 00000000343 14756352071 0021314 0 ustar 00root root 0000000 0000000 prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@
Name: libastra
Description: ASTRA Toolbox
Version: @PACKAGE_VERSION@
Libs: -L${libdir} -lastra
Cflags: -I${includedir} @PKGCONFIG_CFLAGS_EXTRA@
astra-toolbox-2.3.0/build/msvc/ 0000775 0000000 0000000 00000000000 14756352071 0016373 5 ustar 00root root 0000000 0000000 astra-toolbox-2.3.0/build/msvc/astra_vc14.sln 0000664 0000000 0000000 00000025342 14756352071 0021066 0 ustar 00root root 0000000 0000000 
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25420.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "astra_vc14", "projects\astra_vc14.vcxproj", "{DABD9D82-609E-4C71-B1CA-A41B07495290}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "astra_mex", "projects\astra_mex", "{2076FB73-ECFE-4B1B-9A8C-E351C500FAAB}"
ProjectSection(ProjectDependencies) = postProject
{DABD9D82-609E-4C71-B1CA-A41B07495290} = {DABD9D82-609E-4C71-B1CA-A41B07495290}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "astra_mex", "projects\astra_mex_vc14.vcxproj", "{6FDF72C4-A855-4F1C-A401-6500040B5E28}"
ProjectSection(ProjectDependencies) = postProject
{DABD9D82-609E-4C71-B1CA-A41B07495290} = {DABD9D82-609E-4C71-B1CA-A41B07495290}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "astra_mex_algorithm", "projects\astra_mex_algorithm_vc14.vcxproj", "{CE5EF874-830C-4C10-8651-CCA2A34ED9E4}"
ProjectSection(ProjectDependencies) = postProject
{DABD9D82-609E-4C71-B1CA-A41B07495290} = {DABD9D82-609E-4C71-B1CA-A41B07495290}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "astra_mex_data2d", "projects\astra_mex_data2d_vc14.vcxproj", "{D2CDCDB3-7AD9-4853-8D87-BDB1DAD9C9C1}"
ProjectSection(ProjectDependencies) = postProject
{DABD9D82-609E-4C71-B1CA-A41B07495290} = {DABD9D82-609E-4C71-B1CA-A41B07495290}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "astra_mex_data3d", "projects\astra_mex_data3d_vc14.vcxproj", "{2A7084C6-62ED-4235-85F4-094C17689DEB}"
ProjectSection(ProjectDependencies) = postProject
{DABD9D82-609E-4C71-B1CA-A41B07495290} = {DABD9D82-609E-4C71-B1CA-A41B07495290}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "astra_mex_matrix", "projects\astra_mex_matrix_vc14.vcxproj", "{6BFA8857-37EB-4E43-A97C-B860E21599F5}"
ProjectSection(ProjectDependencies) = postProject
{DABD9D82-609E-4C71-B1CA-A41B07495290} = {DABD9D82-609E-4C71-B1CA-A41B07495290}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "astra_mex_projector", "projects\astra_mex_projector_vc14.vcxproj", "{85ECCF1D-C5F6-4E0E-A4F9-0DE7C0B916B2}"
ProjectSection(ProjectDependencies) = postProject
{DABD9D82-609E-4C71-B1CA-A41B07495290} = {DABD9D82-609E-4C71-B1CA-A41B07495290}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "astra_mex_projector3d", "projects\astra_mex_projector3d_vc14.vcxproj", "{CA85BDA0-9BDD-495E-B200-BFE863EB6318}"
ProjectSection(ProjectDependencies) = postProject
{DABD9D82-609E-4C71-B1CA-A41B07495290} = {DABD9D82-609E-4C71-B1CA-A41B07495290}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "astra_mex_log", "projects\astra_mex_log_vc14.vcxproj", "{88539382-66DB-4BBC-A48E-8B6B3CA6064F}"
ProjectSection(ProjectDependencies) = postProject
{DABD9D82-609E-4C71-B1CA-A41B07495290} = {DABD9D82-609E-4C71-B1CA-A41B07495290}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "astra_mex_direct", "projects\astra_mex_direct_vc14.vcxproj", "{47460476-912B-4313-8B10-BDF1D60A84C4}"
ProjectSection(ProjectDependencies) = postProject
{DABD9D82-609E-4C71-B1CA-A41B07495290} = {DABD9D82-609E-4C71-B1CA-A41B07495290}
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug_CUDA|x64 = Debug_CUDA|x64
Debug|x64 = Debug|x64
Release_CUDA|x64 = Release_CUDA|x64
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{DABD9D82-609E-4C71-B1CA-A41B07495290}.Debug_CUDA|x64.ActiveCfg = Debug_CUDA|x64
{DABD9D82-609E-4C71-B1CA-A41B07495290}.Debug_CUDA|x64.Build.0 = Debug_CUDA|x64
{DABD9D82-609E-4C71-B1CA-A41B07495290}.Debug|x64.ActiveCfg = Debug|x64
{DABD9D82-609E-4C71-B1CA-A41B07495290}.Debug|x64.Build.0 = Debug|x64
{DABD9D82-609E-4C71-B1CA-A41B07495290}.Release_CUDA|x64.ActiveCfg = Release_CUDA|x64
{DABD9D82-609E-4C71-B1CA-A41B07495290}.Release_CUDA|x64.Build.0 = Release_CUDA|x64
{DABD9D82-609E-4C71-B1CA-A41B07495290}.Release|x64.ActiveCfg = Release|x64
{DABD9D82-609E-4C71-B1CA-A41B07495290}.Release|x64.Build.0 = Release|x64
{6FDF72C4-A855-4F1C-A401-6500040B5E28}.Debug_CUDA|x64.ActiveCfg = Debug_CUDA|x64
{6FDF72C4-A855-4F1C-A401-6500040B5E28}.Debug_CUDA|x64.Build.0 = Debug_CUDA|x64
{6FDF72C4-A855-4F1C-A401-6500040B5E28}.Debug|x64.ActiveCfg = Debug|x64
{6FDF72C4-A855-4F1C-A401-6500040B5E28}.Debug|x64.Build.0 = Debug|x64
{6FDF72C4-A855-4F1C-A401-6500040B5E28}.Release_CUDA|x64.ActiveCfg = Release_CUDA|x64
{6FDF72C4-A855-4F1C-A401-6500040B5E28}.Release_CUDA|x64.Build.0 = Release_CUDA|x64
{6FDF72C4-A855-4F1C-A401-6500040B5E28}.Release|x64.ActiveCfg = Release|x64
{6FDF72C4-A855-4F1C-A401-6500040B5E28}.Release|x64.Build.0 = Release|x64
{CE5EF874-830C-4C10-8651-CCA2A34ED9E4}.Debug_CUDA|x64.ActiveCfg = Debug_CUDA|x64
{CE5EF874-830C-4C10-8651-CCA2A34ED9E4}.Debug_CUDA|x64.Build.0 = Debug_CUDA|x64
{CE5EF874-830C-4C10-8651-CCA2A34ED9E4}.Debug|x64.ActiveCfg = Debug|x64
{CE5EF874-830C-4C10-8651-CCA2A34ED9E4}.Debug|x64.Build.0 = Debug|x64
{CE5EF874-830C-4C10-8651-CCA2A34ED9E4}.Release_CUDA|x64.ActiveCfg = Release_CUDA|x64
{CE5EF874-830C-4C10-8651-CCA2A34ED9E4}.Release_CUDA|x64.Build.0 = Release_CUDA|x64
{CE5EF874-830C-4C10-8651-CCA2A34ED9E4}.Release|x64.ActiveCfg = Release|x64
{CE5EF874-830C-4C10-8651-CCA2A34ED9E4}.Release|x64.Build.0 = Release|x64
{D2CDCDB3-7AD9-4853-8D87-BDB1DAD9C9C1}.Debug_CUDA|x64.ActiveCfg = Debug_CUDA|x64
{D2CDCDB3-7AD9-4853-8D87-BDB1DAD9C9C1}.Debug_CUDA|x64.Build.0 = Debug_CUDA|x64
{D2CDCDB3-7AD9-4853-8D87-BDB1DAD9C9C1}.Debug|x64.ActiveCfg = Debug|x64
{D2CDCDB3-7AD9-4853-8D87-BDB1DAD9C9C1}.Debug|x64.Build.0 = Debug|x64
{D2CDCDB3-7AD9-4853-8D87-BDB1DAD9C9C1}.Release_CUDA|x64.ActiveCfg = Release_CUDA|x64
{D2CDCDB3-7AD9-4853-8D87-BDB1DAD9C9C1}.Release_CUDA|x64.Build.0 = Release_CUDA|x64
{D2CDCDB3-7AD9-4853-8D87-BDB1DAD9C9C1}.Release|x64.ActiveCfg = Release|x64
{D2CDCDB3-7AD9-4853-8D87-BDB1DAD9C9C1}.Release|x64.Build.0 = Release|x64
{2A7084C6-62ED-4235-85F4-094C17689DEB}.Debug_CUDA|x64.ActiveCfg = Debug_CUDA|x64
{2A7084C6-62ED-4235-85F4-094C17689DEB}.Debug_CUDA|x64.Build.0 = Debug_CUDA|x64
{2A7084C6-62ED-4235-85F4-094C17689DEB}.Debug|x64.ActiveCfg = Debug|x64
{2A7084C6-62ED-4235-85F4-094C17689DEB}.Debug|x64.Build.0 = Debug|x64
{2A7084C6-62ED-4235-85F4-094C17689DEB}.Release_CUDA|x64.ActiveCfg = Release_CUDA|x64
{2A7084C6-62ED-4235-85F4-094C17689DEB}.Release_CUDA|x64.Build.0 = Release_CUDA|x64
{2A7084C6-62ED-4235-85F4-094C17689DEB}.Release|x64.ActiveCfg = Release|x64
{2A7084C6-62ED-4235-85F4-094C17689DEB}.Release|x64.Build.0 = Release|x64
{6BFA8857-37EB-4E43-A97C-B860E21599F5}.Debug_CUDA|x64.ActiveCfg = Debug_CUDA|x64
{6BFA8857-37EB-4E43-A97C-B860E21599F5}.Debug_CUDA|x64.Build.0 = Debug_CUDA|x64
{6BFA8857-37EB-4E43-A97C-B860E21599F5}.Debug|x64.ActiveCfg = Debug|x64
{6BFA8857-37EB-4E43-A97C-B860E21599F5}.Debug|x64.Build.0 = Debug|x64
{6BFA8857-37EB-4E43-A97C-B860E21599F5}.Release_CUDA|x64.ActiveCfg = Release_CUDA|x64
{6BFA8857-37EB-4E43-A97C-B860E21599F5}.Release_CUDA|x64.Build.0 = Release_CUDA|x64
{6BFA8857-37EB-4E43-A97C-B860E21599F5}.Release|x64.ActiveCfg = Release|x64
{6BFA8857-37EB-4E43-A97C-B860E21599F5}.Release|x64.Build.0 = Release|x64
{85ECCF1D-C5F6-4E0E-A4F9-0DE7C0B916B2}.Debug_CUDA|x64.ActiveCfg = Debug_CUDA|x64
{85ECCF1D-C5F6-4E0E-A4F9-0DE7C0B916B2}.Debug_CUDA|x64.Build.0 = Debug_CUDA|x64
{85ECCF1D-C5F6-4E0E-A4F9-0DE7C0B916B2}.Debug|x64.ActiveCfg = Debug|x64
{85ECCF1D-C5F6-4E0E-A4F9-0DE7C0B916B2}.Debug|x64.Build.0 = Debug|x64
{85ECCF1D-C5F6-4E0E-A4F9-0DE7C0B916B2}.Release_CUDA|x64.ActiveCfg = Release_CUDA|x64
{85ECCF1D-C5F6-4E0E-A4F9-0DE7C0B916B2}.Release_CUDA|x64.Build.0 = Release_CUDA|x64
{85ECCF1D-C5F6-4E0E-A4F9-0DE7C0B916B2}.Release|x64.ActiveCfg = Release|x64
{85ECCF1D-C5F6-4E0E-A4F9-0DE7C0B916B2}.Release|x64.Build.0 = Release|x64
{CA85BDA0-9BDD-495E-B200-BFE863EB6318}.Debug_CUDA|x64.ActiveCfg = Debug_CUDA|x64
{CA85BDA0-9BDD-495E-B200-BFE863EB6318}.Debug_CUDA|x64.Build.0 = Debug_CUDA|x64
{CA85BDA0-9BDD-495E-B200-BFE863EB6318}.Debug|x64.ActiveCfg = Debug|x64
{CA85BDA0-9BDD-495E-B200-BFE863EB6318}.Debug|x64.Build.0 = Debug|x64
{CA85BDA0-9BDD-495E-B200-BFE863EB6318}.Release_CUDA|x64.ActiveCfg = Release_CUDA|x64
{CA85BDA0-9BDD-495E-B200-BFE863EB6318}.Release_CUDA|x64.Build.0 = Release_CUDA|x64
{CA85BDA0-9BDD-495E-B200-BFE863EB6318}.Release|x64.ActiveCfg = Release|x64
{CA85BDA0-9BDD-495E-B200-BFE863EB6318}.Release|x64.Build.0 = Release|x64
{88539382-66DB-4BBC-A48E-8B6B3CA6064F}.Debug_CUDA|x64.ActiveCfg = Debug_CUDA|x64
{88539382-66DB-4BBC-A48E-8B6B3CA6064F}.Debug_CUDA|x64.Build.0 = Debug_CUDA|x64
{88539382-66DB-4BBC-A48E-8B6B3CA6064F}.Debug|x64.ActiveCfg = Debug|x64
{88539382-66DB-4BBC-A48E-8B6B3CA6064F}.Debug|x64.Build.0 = Debug|x64
{88539382-66DB-4BBC-A48E-8B6B3CA6064F}.Release_CUDA|x64.ActiveCfg = Release_CUDA|x64
{88539382-66DB-4BBC-A48E-8B6B3CA6064F}.Release_CUDA|x64.Build.0 = Release_CUDA|x64
{88539382-66DB-4BBC-A48E-8B6B3CA6064F}.Release|x64.ActiveCfg = Release|x64
{88539382-66DB-4BBC-A48E-8B6B3CA6064F}.Release|x64.Build.0 = Release|x64
{47460476-912B-4313-8B10-BDF1D60A84C4}.Debug_CUDA|x64.ActiveCfg = Debug_CUDA|x64
{47460476-912B-4313-8B10-BDF1D60A84C4}.Debug_CUDA|x64.Build.0 = Debug_CUDA|x64
{47460476-912B-4313-8B10-BDF1D60A84C4}.Debug|x64.ActiveCfg = Debug|x64
{47460476-912B-4313-8B10-BDF1D60A84C4}.Debug|x64.Build.0 = Debug|x64
{47460476-912B-4313-8B10-BDF1D60A84C4}.Release_CUDA|x64.ActiveCfg = Release_CUDA|x64
{47460476-912B-4313-8B10-BDF1D60A84C4}.Release_CUDA|x64.Build.0 = Release_CUDA|x64
{47460476-912B-4313-8B10-BDF1D60A84C4}.Release|x64.ActiveCfg = Release|x64
{47460476-912B-4313-8B10-BDF1D60A84C4}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{6FDF72C4-A855-4F1C-A401-6500040B5E28} = {2076FB73-ECFE-4B1B-9A8C-E351C500FAAB}
{CE5EF874-830C-4C10-8651-CCA2A34ED9E4} = {2076FB73-ECFE-4B1B-9A8C-E351C500FAAB}
{D2CDCDB3-7AD9-4853-8D87-BDB1DAD9C9C1} = {2076FB73-ECFE-4B1B-9A8C-E351C500FAAB}
{2A7084C6-62ED-4235-85F4-094C17689DEB} = {2076FB73-ECFE-4B1B-9A8C-E351C500FAAB}
{6BFA8857-37EB-4E43-A97C-B860E21599F5} = {2076FB73-ECFE-4B1B-9A8C-E351C500FAAB}
{85ECCF1D-C5F6-4E0E-A4F9-0DE7C0B916B2} = {2076FB73-ECFE-4B1B-9A8C-E351C500FAAB}
{CA85BDA0-9BDD-495E-B200-BFE863EB6318} = {2076FB73-ECFE-4B1B-9A8C-E351C500FAAB}
{88539382-66DB-4BBC-A48E-8B6B3CA6064F} = {2076FB73-ECFE-4B1B-9A8C-E351C500FAAB}
{47460476-912B-4313-8B10-BDF1D60A84C4} = {2076FB73-ECFE-4B1B-9A8C-E351C500FAAB}
EndGlobalSection
EndGlobal
astra-toolbox-2.3.0/build/msvc/build_clean.bat 0000664 0000000 0000000 00000000261 14756352071 0021323 0 ustar 00root root 0000000 0000000 @echo off
call "%~dp0build_env.bat"
call "%B_VC%\vcvars64.bat"
cd %~dp0
msbuild astra_vc14.sln /p:Configuration=Release_CUDA /p:Platform=x64 /t:clean /maxcpucount:20
pause
astra-toolbox-2.3.0/build/msvc/build_env.bat 0000664 0000000 0000000 00000000466 14756352071 0021040 0 ustar 00root root 0000000 0000000 set B_WP3=3.13.1
set B_WINPYTHON3=C:\Python313
set B_MATLAB_ROOT=C:\Users\Vagrant\MATLAB\R2023b
set B_VC=C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\
set B_VCREDIST=C:\Users\Vagrant\vc_redist.x64.exe
set B_README_WP3=%B_WINPYTHON3%\Lib\site-packages
set B_RELEASE=2.3.0
astra-toolbox-2.3.0/build/msvc/build_matlab.bat 0000664 0000000 0000000 00000000314 14756352071 0021500 0 ustar 00root root 0000000 0000000 @echo off
call "%~dp0build_env.bat"
call "%B_VC%\vcvars64.bat"
cd /D %~dp0
set MATLAB_ROOT=%B_MATLAB_ROOT%
msbuild astra_vc14.sln /p:Configuration=Release_CUDA /p:Platform=x64 /maxcpucount:20
pause
astra-toolbox-2.3.0/build/msvc/build_python3.bat 0000664 0000000 0000000 00000001306 14756352071 0021646 0 ustar 00root root 0000000 0000000 @echo off
cd /D %~dp0
cd ..\..
set R=%CD%
call "%~dp0build_env.bat"
call "%B_VC%\vcvars64.bat"
cd /D %~dp0
msbuild astra_vc14.sln /p:Configuration=Release_CUDA /p:Platform=x64 /t:astra_vc14 /maxcpucount:20
cd /D %R%
cd python
rd /s /q build
rd /s /q "%B_WINPYTHON3%\lib\site-packages\astra"
set CL=/DASTRA_CUDA /DASTRA_PYTHON /std:c++17
set INCLUDE=%R%\include;%R%\lib\include;%CUDA_PATH%\include;%INCLUDE%
copy ..\build\msvc\bin\x64\Release_CUDA\AstraCuda64.lib astra.lib
%B_WINPYTHON3%\python builder.py build_ext --compiler=msvc add_extra_lib --file=..\build\msvc\bin\x64\Release_CUDA\AstraCuda64.dll;"%CUDA_PATH_V12_8%\bin\cudart64_12.dll";"%CUDA_PATH_V12_8%\bin\cufft64_11.dll" bdist_wheel
pause
astra-toolbox-2.3.0/build/msvc/build_release.bat 0000664 0000000 0000000 00000004160 14756352071 0021663 0 ustar 00root root 0000000 0000000 @echo off
cd /D %~dp0
cd ..\..
set R=%CD%
call "%~dp0build_env.bat"
cd /D %~dp0
rd /s /q release
mkdir release
cd release
mkdir matlab
mkdir python313
pause
cd %R%\build\msvc\release\matlab
mkdir astra-%B_RELEASE%
cd astra-%B_RELEASE%
xcopy /e /i %R%\samples\matlab samples
xcopy /e /i %R%\matlab\algorithms algorithms
xcopy /e /i %R%\matlab\tools tools
copy %R%\NEWS.txt .
copy %R%\README.txt .
copy %R%\COPYING COPYING.txt
copy %B_VCREDIST% .
mkdir mex
copy %R%\build\msvc\bin\x64\Release_CUDA\*.mexw64 mex
copy %R%\build\msvc\bin\x64\Release_CUDA\AstraCuda64.dll mex
copy %R%\build\msvc\bin\x64\Release_CUDA\AstraCuda64.lib mex
copy "%CUDA_PATH_V12_8%\bin\cudart64_12.dll" mex
copy "%CUDA_PATH_V12_8%\bin\cufft64_11.dll" mex
pause
rem -------------------------------------------------------------------
cd %R%\build\msvc\release\python313
mkdir astra-%B_RELEASE%
cd astra-%B_RELEASE%
xcopy /e /i %R%\samples\python samples
copy %R%\NEWS.txt .
copy %R%\COPYING COPYING.txt
copy %B_VCREDIST% .
copy %R%\python\dist\*.whl .
(
echo -----------------------------------------------------------------------
echo This file is part of the ASTRA Toolbox
echo.
echo Copyright: 2010-2024, imec Vision Lab, University of Antwerp
echo 2014-2024, CWI, Amsterdam
echo https://visielab.uantwerpen.be/ and https://www.cwi.nl/
echo License: Open Source under GPLv3
echo Contact: astra@astra-toolbox.com
echo Website: https://www.astra-toolbox.com/
echo -----------------------------------------------------------------------
echo.
echo.
echo This directory contains pre-built Python modules for the ASTRA Toolbox.
echo.
echo It has been built with python %B_WP3%, installed via Chocolatey.
echo.
echo To use it, run 'pip3 install astra_toolbox-%B_RELEASE%-cp312-cp312-win_amd64.whl'
echo.
echo Sample code can be found in the samples\ directory.
) > README.txt
pause
cd %R%\build\msvc\release
%B_WINPYTHON3%\python -c "import shutil; shutil.make_archive('astra-%B_RELEASE%-matlab-win-x64', 'zip', 'matlab')"
%B_WINPYTHON3%\python -c "import shutil; shutil.make_archive('astra-%B_RELEASE%-python313-win-x64', 'zip', 'python313')"
pause
astra-toolbox-2.3.0/build/msvc/build_setup.bat 0000664 0000000 0000000 00000000233 14756352071 0021400 0 ustar 00root root 0000000 0000000 @echo off
call "%~dp0build_env.bat"
cd /D %~dp0
cd ..\..
set R=%CD%
echo Removing bin directories
rd /s /q "%R%\build\msvc\bin\x64\Release_CUDA"
pause
astra-toolbox-2.3.0/build/msvc/gen.py 0000664 0000000 0000000 00000105553 14756352071 0017527 0 ustar 00root root 0000000 0000000 import sys
import os
import codecs
vcppguid = "8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942" # C++ project
siguid = "2150E333-8FDC-42A3-9474-1A3956D46DE8" # project group
# to generate a new uuid:
#
# import uuid
# uuid.uuid4().__str__().upper()
# see configure.ac
CUDA_CC = {
(9,0): "compute_30,sm_30;compute_50,sm_50;compute_60,sm_60;compute_70,sm_70;compute_70,compute_70",
(9,2): "compute_30,sm_30;compute_50,sm_50;compute_60,sm_60;compute_70,sm_70;compute_70,compute_70",
(10,0): "compute_30,sm_30;compute_50,sm_50;compute_60,sm_60;compute_70,sm_70;compute_75,sm_75;compute_75,compute_75",
(10,1): "compute_30,sm_30;compute_50,sm_50;compute_60,sm_60;compute_70,sm_70;compute_75,sm_75;compute_75,compute_75",
(10,2): "compute_30,sm_30;compute_50,sm_50;compute_60,sm_60;compute_70,sm_70;compute_75,sm_75;compute_75,compute_75",
(11,0): "compute_35,sm_35;compute_50,sm_50;compute_60,sm_60;compute_70,sm_70;compute_75,sm_75;compute_80,sm_80;compute_80,compute_80",
(11,1): "compute_35,sm_35;compute_50,sm_50;compute_60,sm_60;compute_70,sm_70;compute_75,sm_75;compute_80,sm_80;compute_86,sm_86;compute_86,compute_86",
(11,2): "compute_35,sm_35;compute_50,sm_50;compute_60,sm_60;compute_70,sm_70;compute_75,sm_75;compute_80,sm_80;compute_86,sm_86;compute_86,compute_86",
(11,3): "compute_35,sm_35;compute_50,sm_50;compute_60,sm_60;compute_70,sm_70;compute_75,sm_75;compute_80,sm_80;compute_86,sm_86;compute_86,compute_86",
(11,4): "compute_35,sm_35;compute_50,sm_50;compute_60,sm_60;compute_70,sm_70;compute_75,sm_75;compute_80,sm_80;compute_86,sm_86;compute_86,compute_86",
(11,5): "compute_35,sm_35;compute_50,sm_50;compute_60,sm_60;compute_70,sm_70;compute_75,sm_75;compute_80,sm_80;compute_86,sm_86;compute_86,compute_86",
(11,6): "compute_35,sm_35;compute_50,sm_50;compute_60,sm_60;compute_70,sm_70;compute_75,sm_75;compute_80,sm_80;compute_86,sm_86;compute_86,compute_86",
(11,7): "compute_35,sm_35;compute_50,sm_50;compute_60,sm_60;compute_70,sm_70;compute_75,sm_75;compute_80,sm_80;compute_86,sm_86;compute_86,compute_86",
(11,8): "compute_35,sm_35;compute_50,sm_50;compute_60,sm_60;compute_70,sm_70;compute_75,sm_75;compute_80,sm_80;compute_86,sm_86;compute_86,compute_86",
(12,0): "compute_50,sm_50;compute_60,sm_60;compute_70,sm_70;compute_75,sm_75;compute_80,sm_80;compute_86,sm_86;compute_86,compute_86",
(12,1): "compute_50,sm_50;compute_60,sm_60;compute_70,sm_70;compute_75,sm_75;compute_80,sm_80;compute_86,sm_86;compute_86,compute_86",
(12,2): "compute_50,sm_50;compute_60,sm_60;compute_70,sm_70;compute_75,sm_75;compute_80,sm_80;compute_86,sm_86;compute_86,compute_86",
(12,3): "compute_50,sm_50;compute_60,sm_60;compute_70,sm_70;compute_75,sm_75;compute_80,sm_80;compute_86,sm_86;compute_87,sm_87;compute_89,sm_89;compute_90,sm_90;compute_90,compute_90",
(12,4): "compute_50,sm_50;compute_60,sm_60;compute_70,sm_70;compute_75,sm_75;compute_80,sm_80;compute_86,sm_86;compute_87,sm_87;compute_89,sm_89;compute_90,sm_90;compute_90,compute_90",
(12,5): "compute_50,sm_50;compute_60,sm_60;compute_70,sm_70;compute_75,sm_75;compute_80,sm_80;compute_86,sm_86;compute_87,sm_87;compute_89,sm_89;compute_90,sm_90;compute_90,compute_90",
(12,8): "compute_50,sm_50;compute_60,sm_60;compute_70,sm_70;compute_75,sm_75;compute_80,sm_80;compute_86,sm_86;compute_87,sm_87;compute_89,sm_89;compute_90,sm_90;compute_100,sm_100;compute_101,sm_101;compute_120,sm_120;compute_120,compute_120",
}
def create_mex_project(name, uuid14):
return { "type": vcppguid, "name": name, "file14": name + "_vc14.vcxproj", "uuid14": uuid14, "files": [] }
P_astra = { "type": vcppguid, "name": "astra_vc14", "file14": "astra_vc14.vcxproj", "uuid14": "DABD9D82-609E-4C71-B1CA-A41B07495290" }
P0 = create_mex_project("astra_mex", "6FDF72C4-A855-4F1C-A401-6500040B5E28")
P1 = create_mex_project("astra_mex_algorithm", "CE5EF874-830C-4C10-8651-CCA2A34ED9E4")
P2 = create_mex_project("astra_mex_data2d", "D2CDCDB3-7AD9-4853-8D87-BDB1DAD9C9C1")
P3 = create_mex_project("astra_mex_data3d", "2A7084C6-62ED-4235-85F4-094C17689DEB")
P4 = create_mex_project("astra_mex_matrix", "6BFA8857-37EB-4E43-A97C-B860E21599F5")
P5 = create_mex_project("astra_mex_projector", "85ECCF1D-C5F6-4E0E-A4F9-0DE7C0B916B2")
P6 = create_mex_project("astra_mex_projector3d", "CA85BDA0-9BDD-495E-B200-BFE863EB6318")
P7 = create_mex_project("astra_mex_log", "88539382-66DB-4BBC-A48E-8B6B3CA6064F")
P8 = create_mex_project("astra_mex_direct", "47460476-912B-4313-8B10-BDF1D60A84C4")
F_astra_mex = { "type": siguid,
"name": "astra_mex",
"file14": "astra_mex",
"uuid14": "2076FB73-ECFE-4B1B-9A8C-E351C500FAAB",
"entries": [ P0, P1, P2, P3, P4, P5, P6, P7, P8 ] }
P0["files"] = [
"astra_mex_c.cpp",
"mexHelpFunctions.cpp",
"mexHelpFunctions.h",
"mexInitFunctions.cpp",
"mexInitFunctions.h",
]
P1["files"] = [
"astra_mex_algorithm_c.cpp",
"mexHelpFunctions.cpp",
"mexHelpFunctions.h",
"mexInitFunctions.cpp",
"mexInitFunctions.h",
]
P2["files"] = [
"astra_mex_data2d_c.cpp",
"mexHelpFunctions.cpp",
"mexHelpFunctions.h",
"mexCopyDataHelpFunctions.cpp",
"mexCopyDataHelpFunctions.h",
"mexDataManagerHelpFunctions.cpp",
"mexDataManagerHelpFunctions.h",
"mexInitFunctions.cpp",
"mexInitFunctions.h",
]
P3["files"] = [
"astra_mex_data3d_c.cpp",
"mexHelpFunctions.cpp",
"mexHelpFunctions.h",
"mexCopyDataHelpFunctions.cpp",
"mexCopyDataHelpFunctions.h",
"mexDataManagerHelpFunctions.cpp",
"mexDataManagerHelpFunctions.h",
"mexInitFunctions.cpp",
"mexInitFunctions.h",
]
P4["files"] = [
"astra_mex_matrix_c.cpp",
"mexHelpFunctions.cpp",
"mexHelpFunctions.h",
"mexInitFunctions.cpp",
"mexInitFunctions.h",
]
P5["files"] = [
"astra_mex_projector_c.cpp",
"mexHelpFunctions.cpp",
"mexHelpFunctions.h",
"mexInitFunctions.cpp",
"mexInitFunctions.h",
]
P6["files"] = [
"astra_mex_projector3d_c.cpp",
"mexHelpFunctions.cpp",
"mexHelpFunctions.h",
"mexInitFunctions.cpp",
"mexInitFunctions.h",
]
P7["files"] = [
"astra_mex_log_c.cpp",
"mexHelpFunctions.cpp",
"mexHelpFunctions.h",
"mexInitFunctions.cpp",
"mexInitFunctions.h",
]
P8["files"] = [
"astra_mex_direct_c.cpp",
"mexHelpFunctions.cpp",
"mexHelpFunctions.h",
"mexCopyDataHelpFunctions.cpp",
"mexCopyDataHelpFunctions.h",
"mexDataManagerHelpFunctions.cpp",
"mexDataManagerHelpFunctions.h",
"mexInitFunctions.cpp",
"mexInitFunctions.h",
]
P_astra["filter_names"] = [
"Algorithms",
"Data Structures",
"Projectors",
"CUDA",
"Global & Other",
"Geometries",
"Algorithms\\headers",
"Algorithms\\source",
"Data Structures\\headers",
"Data Structures\\source",
"Global & Other\\headers",
"Global & Other\\source",
"Geometries\\headers",
"Geometries\\source",
"Projectors\\headers",
"Projectors\\inline",
"Projectors\\source",
"CUDA\\astra headers",
"CUDA\\astra source",
"CUDA\\cuda headers",
"CUDA\\cuda source",
]
P_astra["filters"] = {}
P_astra["filters"]["Algorithms"] = [ "262b0d17-774a-4cb1-b51a-b358d2d02791" ]
P_astra["filters"]["Data Structures"] = [ "76d6d672-670b-4454-b3ab-10dc8f9b8710" ]
P_astra["filters"]["Projectors"] = [ "77a581a9-60da-4265-97c0-80cdf97408c0" ]
P_astra["filters"]["CUDA"] = [ "c1af0e56-5fcc-4e75-b5db-88eeb4148185" ]
P_astra["filters"]["Global & Other"] = [ "72fbe846-10ef-4c52-88df-13bd66c4cbfc" ]
P_astra["filters"]["Geometries"] = [ "7ef37c12-c98c-4dd6-938d-12f49279eae0" ]
P_astra["filters"]["CUDA\\cuda source"] = [
"04a878ed-77b4-4525-9bc2-38ccd65282c5",
"cuda\\2d\\algo.cu",
"cuda\\2d\\arith.cu",
"cuda\\2d\\astra.cu",
"cuda\\2d\\cgls.cu",
"cuda\\2d\\darthelper.cu",
"cuda\\2d\\em.cu",
"cuda\\2d\\fan_bp.cu",
"cuda\\2d\\fan_fp.cu",
"cuda\\2d\\fbp.cu",
"cuda\\2d\\fft.cu",
"cuda\\2d\\par_bp.cu",
"cuda\\2d\\par_fp.cu",
"cuda\\2d\\sart.cu",
"cuda\\2d\\sirt.cu",
"cuda\\2d\\util.cu",
"cuda\\3d\\algo3d.cu",
"cuda\\3d\\arith3d.cu",
"cuda\\3d\\astra3d.cu",
"cuda\\3d\\cgls3d.cu",
"cuda\\3d\\cone_bp.cu",
"cuda\\3d\\cone_fp.cu",
"cuda\\3d\\darthelper3d.cu",
"cuda\\3d\\fdk.cu",
"cuda\\3d\\mem3d.cu",
"cuda\\3d\\par3d_bp.cu",
"cuda\\3d\\par3d_fp.cu",
"cuda\\3d\\sirt3d.cu",
"cuda\\3d\\util3d.cu",
]
P_astra["filters"]["Algorithms\\source"] = [
"9df653ab-26c3-4bec-92a2-3dda22fda761",
"src\\Algorithm.cpp",
"src\\ArtAlgorithm.cpp",
"src\\BackProjectionAlgorithm.cpp",
"src\\CglsAlgorithm.cpp",
"src\\FilteredBackProjectionAlgorithm.cpp",
"src\\ForwardProjectionAlgorithm.cpp",
"src\\PluginAlgorithmFactory.cpp",
"src\\ReconstructionAlgorithm2D.cpp",
"src\\ReconstructionAlgorithm3D.cpp",
"src\\SartAlgorithm.cpp",
"src\\SirtAlgorithm.cpp",
]
P_astra["filters"]["Data Structures\\source"] = [
"95346487-8185-487b-a794-3e7fb5fcbd4c",
"src\\Data3D.cpp",
"src\\Float32Data.cpp",
"src\\Float32Data2D.cpp",
"src\\Float32ProjectionData2D.cpp",
"src\\Float32VolumeData2D.cpp",
"src\\SheppLogan.cpp",
"src\\SparseMatrix.cpp",
]
P_astra["filters"]["Global & Other\\source"] = [
"1546cb47-7e5b-42c2-b695-ef172024c14b",
"src\\AstraObjectFactory.cpp",
"src\\AstraObjectManager.cpp",
"src\\CompositeGeometryManager.cpp",
"src\\Config.cpp",
"src\\Features.cpp",
"src\\Filters.cpp",
"src\\Fourier.cpp",
"src\\Globals.cpp",
"src\\Logging.cpp",
"src\\PlatformDepSystemCode.cpp",
"src\\Utilities.cpp",
"src\\XMLConfig.cpp",
"src\\XMLDocument.cpp",
"src\\XMLNode.cpp",
]
P_astra["filters"]["Geometries\\source"] = [
"dc27bff7-4256-4311-a131-47612a44af20",
"src\\ConeProjectionGeometry3D.cpp",
"src\\ConeVecProjectionGeometry3D.cpp",
"src\\FanFlatProjectionGeometry2D.cpp",
"src\\FanFlatVecProjectionGeometry2D.cpp",
"src\\GeometryUtil2D.cpp",
"src\\GeometryUtil3D.cpp",
"src\\ParallelProjectionGeometry2D.cpp",
"src\\ParallelProjectionGeometry3D.cpp",
"src\\ParallelVecProjectionGeometry2D.cpp",
"src\\ParallelVecProjectionGeometry3D.cpp",
"src\\ProjectionGeometry2D.cpp",
"src\\ProjectionGeometry2DFactory.cpp",
"src\\ProjectionGeometry3D.cpp",
"src\\ProjectionGeometry3DFactory.cpp",
"src\\SparseMatrixProjectionGeometry2D.cpp",
"src\\VolumeGeometry2D.cpp",
"src\\VolumeGeometry3D.cpp",
]
P_astra["filters"]["Projectors\\source"] = [
"2d60e3c8-7874-4cee-b139-991ac15e811d",
"src\\DataProjector.cpp",
"src\\DataProjectorPolicies.cpp",
"src\\FanFlatBeamLineKernelProjector2D.cpp",
"src\\FanFlatBeamStripKernelProjector2D.cpp",
"src\\ParallelBeamBlobKernelProjector2D.cpp",
"src\\ParallelBeamDistanceDrivenProjector2D.cpp",
"src\\ParallelBeamLinearKernelProjector2D.cpp",
"src\\ParallelBeamLineKernelProjector2D.cpp",
"src\\ParallelBeamStripKernelProjector2D.cpp",
"src\\Projector2D.cpp",
"src\\Projector3D.cpp",
"src\\SparseMatrixProjector2D.cpp",
]
P_astra["filters"]["CUDA\\astra source"] = [
"bbef012e-598a-456f-90d8-416bdcb4221c",
"src\\CudaBackProjectionAlgorithm.cpp",
"src\\CudaBackProjectionAlgorithm3D.cpp",
"src\\CudaCglsAlgorithm.cpp",
"src\\CudaCglsAlgorithm3D.cpp",
"src\\CudaDartMaskAlgorithm.cpp",
"src\\CudaDartMaskAlgorithm3D.cpp",
"src\\CudaDartSmoothingAlgorithm.cpp",
"src\\CudaDartSmoothingAlgorithm3D.cpp",
"src\\CudaDataOperationAlgorithm.cpp",
"src\\CudaEMAlgorithm.cpp",
"src\\CudaFDKAlgorithm3D.cpp",
"src\\CudaFilteredBackProjectionAlgorithm.cpp",
"src\\CudaForwardProjectionAlgorithm.cpp",
"src\\CudaForwardProjectionAlgorithm3D.cpp",
"src\\CudaProjector2D.cpp",
"src\\CudaProjector3D.cpp",
"src\\CudaReconstructionAlgorithm2D.cpp",
"src\\CudaRoiSelectAlgorithm.cpp",
"src\\CudaSartAlgorithm.cpp",
"src\\CudaSirtAlgorithm.cpp",
"src\\CudaSirtAlgorithm3D.cpp",
]
P_astra["filters"]["CUDA\\cuda headers"] = [
"4e17872e-db7d-41bc-9760-fad1c253b583",
"include\\astra\\cuda\\2d\\algo.h",
"include\\astra\\cuda\\2d\\arith.h",
"include\\astra\\cuda\\2d\\astra.h",
"include\\astra\\cuda\\2d\\cgls.h",
"include\\astra\\cuda\\2d\\darthelper.h",
"include\\astra\\cuda\\2d\\dims.h",
"include\\astra\\cuda\\2d\\em.h",
"include\\astra\\cuda\\2d\\fan_bp.h",
"include\\astra\\cuda\\2d\\fan_fp.h",
"include\\astra\\cuda\\2d\\fbp.h",
"include\\astra\\cuda\\2d\\fft.h",
"include\\astra\\cuda\\2d\\par_bp.h",
"include\\astra\\cuda\\2d\\par_fp.h",
"include\\astra\\cuda\\2d\\sart.h",
"include\\astra\\cuda\\2d\\sirt.h",
"include\\astra\\cuda\\2d\\util.h",
"include\\astra\\cuda\\3d\\algo3d.h",
"include\\astra\\cuda\\3d\\arith3d.h",
"include\\astra\\cuda\\3d\\astra3d.h",
"include\\astra\\cuda\\3d\\cgls3d.h",
"include\\astra\\cuda\\3d\\cone_bp.h",
"include\\astra\\cuda\\3d\\cone_fp.h",
"include\\astra\\cuda\\3d\\darthelper3d.h",
"include\\astra\\cuda\\3d\\dims3d.h",
"include\\astra\\cuda\\3d\\fdk.h",
"include\\astra\\cuda\\3d\\mem3d.h",
"include\\astra\\cuda\\3d\\par3d_bp.h",
"include\\astra\\cuda\\3d\\par3d_fp.h",
"include\\astra\\cuda\\3d\\sirt3d.h",
"include\\astra\\cuda\\3d\\util3d.h",
]
P_astra["filters"]["Algorithms\\headers"] = [
"a76ffd6d-3895-4365-b27e-fc9a72f2ed75",
"include\\astra\\Algorithm.h",
"include\\astra\\AlgorithmTypelist.h",
"include\\astra\\ArtAlgorithm.h",
"include\\astra\\BackProjectionAlgorithm.h",
"include\\astra\\CglsAlgorithm.h",
"include\\astra\\CudaBackProjectionAlgorithm.h",
"include\\astra\\CudaBackProjectionAlgorithm3D.h",
"include\\astra\\FilteredBackProjectionAlgorithm.h",
"include\\astra\\ForwardProjectionAlgorithm.h",
"include\\astra\\PluginAlgorithmFactory.h",
"include\\astra\\ReconstructionAlgorithm2D.h",
"include\\astra\\ReconstructionAlgorithm3D.h",
"include\\astra\\SartAlgorithm.h",
"include\\astra\\SirtAlgorithm.h",
]
P_astra["filters"]["Data Structures\\headers"] = [
"444c44b0-6454-483a-be26-7cb9c8ab0b98",
"include\\astra\\Data3D.h",
"include\\astra\\Float32Data.h",
"include\\astra\\Float32Data2D.h",
"include\\astra\\Float32ProjectionData2D.h",
"include\\astra\\Float32VolumeData2D.h",
"include\\astra\\SheppLogan.h",
"include\\astra\\SparseMatrix.h",
]
P_astra["filters"]["Global & Other\\headers"] = [
"1c52efc8-a77e-4c72-b9be-f6429a87e6d7",
"include\\astra\\AstraObjectFactory.h",
"include\\astra\\AstraObjectManager.h",
"include\\astra\\clog.h",
"include\\astra\\CompositeGeometryManager.h",
"include\\astra\\Config.h",
"include\\astra\\Features.h",
"include\\astra\\Filters.h",
"include\\astra\\Fourier.h",
"include\\astra\\Globals.h",
"include\\astra\\Logging.h",
"include\\astra\\PlatformDepSystemCode.h",
"include\\astra\\Singleton.h",
"include\\astra\\TypeList.h",
"include\\astra\\Utilities.h",
"include\\astra\\Vector3D.h",
"include\\astra\\XMLConfig.h",
"include\\astra\\XMLDocument.h",
"include\\astra\\XMLNode.h",
]
P_astra["filters"]["Geometries\\headers"] = [
"eddb31ba-0db7-4ab1-a490-36623aaf8901",
"include\\astra\\ConeProjectionGeometry3D.h",
"include\\astra\\ConeVecProjectionGeometry3D.h",
"include\\astra\\FanFlatProjectionGeometry2D.h",
"include\\astra\\FanFlatVecProjectionGeometry2D.h",
"include\\astra\\GeometryUtil2D.h",
"include\\astra\\GeometryUtil3D.h",
"include\\astra\\ParallelProjectionGeometry2D.h",
"include\\astra\\ParallelProjectionGeometry3D.h",
"include\\astra\\ParallelVecProjectionGeometry2D.h",
"include\\astra\\ParallelVecProjectionGeometry3D.h",
"include\\astra\\ProjectionGeometry2D.h",
"include\\astra\\ProjectionGeometry2DFactory.h",
"include\\astra\\ProjectionGeometry3D.h",
"include\\astra\\ProjectionGeometry3DFactory.h",
"include\\astra\\SparseMatrixProjectionGeometry2D.h",
"include\\astra\\VolumeGeometry2D.h",
"include\\astra\\VolumeGeometry3D.h",
]
P_astra["filters"]["Projectors\\headers"] = [
"91ae2cfd-6b45-46eb-ad99-2f16e5ce4b1e",
"include\\astra\\DataProjector.h",
"include\\astra\\DataProjectorPolicies.h",
"include\\astra\\FanFlatBeamLineKernelProjector2D.h",
"include\\astra\\FanFlatBeamStripKernelProjector2D.h",
"include\\astra\\ParallelBeamBlobKernelProjector2D.h",
"include\\astra\\ParallelBeamDistanceDrivenProjector2D.h",
"include\\astra\\ParallelBeamLinearKernelProjector2D.h",
"include\\astra\\ParallelBeamLineKernelProjector2D.h",
"include\\astra\\ParallelBeamStripKernelProjector2D.h",
"include\\astra\\Projector2D.h",
"include\\astra\\Projector3D.h",
"include\\astra\\ProjectorTypelist.h",
"include\\astra\\SparseMatrixProjector2D.h",
]
P_astra["filters"]["CUDA\\astra headers"] = [
"bd4e1f94-2f56-4db6-b946-20c29d65a351",
"include\\astra\\CudaCglsAlgorithm.h",
"include\\astra\\CudaCglsAlgorithm3D.h",
"include\\astra\\CudaDartMaskAlgorithm.h",
"include\\astra\\CudaDartMaskAlgorithm3D.h",
"include\\astra\\CudaDartSmoothingAlgorithm.h",
"include\\astra\\CudaDartSmoothingAlgorithm3D.h",
"include\\astra\\CudaDataOperationAlgorithm.h",
"include\\astra\\CudaEMAlgorithm.h",
"include\\astra\\CudaFDKAlgorithm3D.h",
"include\\astra\\CudaFilteredBackProjectionAlgorithm.h",
"include\\astra\\CudaForwardProjectionAlgorithm.h",
"include\\astra\\CudaForwardProjectionAlgorithm3D.h",
"include\\astra\\CudaProjector2D.h",
"include\\astra\\CudaProjector3D.h",
"include\\astra\\CudaReconstructionAlgorithm2D.h",
"include\\astra\\CudaRoiSelectAlgorithm.h",
"include\\astra\\CudaSartAlgorithm.h",
"include\\astra\\CudaSirtAlgorithm.h",
"include\\astra\\CudaSirtAlgorithm3D.h",
]
P_astra["filters"]["Projectors\\inline"] = [
"0daffd63-ba49-4a5f-8d7a-5322e0e74f22",
"include\\astra\\DataProjectorPolicies.inl",
"include\\astra\\FanFlatBeamLineKernelProjector2D.inl",
"include\\astra\\FanFlatBeamStripKernelProjector2D.inl",
"include\\astra\\ParallelBeamBlobKernelProjector2D.inl",
"include\\astra\\ParallelBeamDistanceDrivenProjector2D.inl",
"include\\astra\\ParallelBeamLinearKernelProjector2D.inl",
"include\\astra\\ParallelBeamLineKernelProjector2D.inl",
"include\\astra\\ParallelBeamStripKernelProjector2D.inl",
"include\\astra\\SparseMatrixProjector2D.inl",
]
P_astra["files"] = []
for f in P_astra["filters"]:
P_astra["files"].extend(P_astra["filters"][f][1:])
P_astra["files"].sort()
projects = [ P_astra, F_astra_mex, P0, P1, P2, P3, P4, P5, P6, P7, P8 ]
bom = codecs.BOM_UTF8.decode("utf-8")
class Configuration:
def __init__(self, debug, cuda):
self.debug = debug
self.cuda = cuda
def type(self):
if self.debug:
return "Debug"
else:
return "Release"
def config(self):
n = self.type()
if self.cuda:
n += "_CUDA"
return n
def platform(self):
return "x64"
def name(self):
n = self.config()
n += "|"
n += self.platform()
return n
def target(self):
n = "Astra"
if self.cuda:
n += "Cuda"
n += "64"
if self.debug:
n += "D"
return n
configs = [ Configuration(a,b) for a in [ True, False ] for b in [ True, False ] ]
def write_sln():
main_project = P_astra
F = open("astra_vc14.sln", "w", encoding="utf-8")
print(bom, file=F)
print("Microsoft Visual Studio Solution File, Format Version 12.00", file=F)
print("# Visual Studio 14", file=F)
print("VisualStudioVersion = 14.0.25420.1", file=F)
print("MinimumVisualStudioVersion = 10.0.40219.1", file=F)
for p in projects:
s = '''Project("{%s}") = "%s", "projects\\%s", "{%s}"''' % (p["type"], p["name"], p["file14"], p["uuid14"])
print(s, file=F)
if "mex" in p["name"]:
print("\tProjectSection(ProjectDependencies) = postProject", file=F)
print("\t\t{%s} = {%s}" % (main_project["uuid14"], main_project["uuid14"]), file=F)
print("\tEndProjectSection", file=F)
print("EndProject", file=F)
print("Global", file=F)
print("\tGlobalSection(SolutionConfigurationPlatforms) = preSolution", file=F)
for c in configs:
print("\t\t" + c.name() + " = " + c.name(), file=F)
print("\tEndGlobalSection", file=F)
print("\tGlobalSection(ProjectConfigurationPlatforms) = postSolution", file=F)
for p in projects:
if "entries" in p:
continue
for c in configs:
print("\t\t{" + p["uuid14"] + "}." + c.name() + ".ActiveCfg = " + c.name(), file=F)
print("\t\t{" + p["uuid14"] + "}." + c.name() + ".Build.0 = " + c.name(), file=F)
print("\tEndGlobalSection", file=F)
print("\tGlobalSection(SolutionProperties) = preSolution", file=F)
print("\t\tHideSolutionNode = FALSE", file=F)
print("\tEndGlobalSection", file=F)
print("\tGlobalSection(NestedProjects) = preSolution", file=F)
for p in projects:
if "entries" not in p:
continue
for e in p["entries"]:
print("\t\t{" + e["uuid14"] + "} = {" + p["uuid14"] + "}", file=F)
print("\tEndGlobalSection", file=F)
print("EndGlobal", file=F)
F.close()
def write_project14_start(P, F):
print(bom + '', file=F)
print('', file=F)
print(' ', file=F)
for c in configs:
print(' ', file=F)
print(' ' + c.config() + '', file=F)
print(' ' + c.platform() + '', file=F)
print(' ', file=F)
print(' ', file=F)
print(' ', file=F)
if 'mex' in P["name"]:
print(' ' + P["name"] + '', file=F)
print(' {' + P["uuid14"] + '}', file=F)
if 'mex' in P["name"]:
print(' astraMatlab', file=F)
else:
print(' ' + P["name"] + '', file=F)
print(' 10.0.22621.0', file=F)
print(' ', file=F)
print(' ', file=F)
for c in configs:
print(''' ''' % (c.name(), ), file=F)
print(' DynamicLibrary', file=F)
if 'mex' not in P["name"]:
if c.debug:
print(' true', file=F)
else:
print(' false', file=F)
print(' v141', file=F)
if 'mex' not in P["name"]:
if not c.debug:
print(' true', file=F)
print(' MultiByte', file=F)
print(' ', file=F)
print(' ', file=F)
print(' ', file=F)
if "mex" not in P["name"]:
print(f' ', file=F)
print(' ', file=F)
for c in configs:
print(''' ''' % (c.name(), ), file=F)
print(''' ''', file=F)
print(''' ''', file=F)
print(' ', file=F)
def write_project14_end(P, F):
relpath = '..\\..\\..\\'
if 'mex' in P["name"]:
relpath += 'matlab\\mex\\'
l = [ f for f in P["files"] if len(f) > 4 and f[-4:] == ".cpp" ]
if l:
print(' ', file=F)
for f in l:
if ("cuda" in f) or ("Cuda" in f):
print(' ', file=F)
for c in configs:
if not c.cuda:
print(''' true''' % (c.name(), ), file=F)
print(' ', file=F)
else:
print(' ', file=F)
print(' ', file=F)
l = [ f for f in P["files"] if len(f) > 2 and f[-2:] == ".h" ]
if l:
print(' ', file=F)
for f in l:
print(' ', file=F)
print(' ', file=F)
l = [ f for f in P["files"] if len(f) > 3 and f[-3:] == ".cu" ]
if l:
print(' ', file=F)
for f in l:
print(' ', file=F)
for c in configs:
if not c.cuda:
print(''' true''' % (c.name(), ), file=F)
print(' ', file=F)
print(' ', file=F)
l = [ f for f in P["files"] if len(f) > 4 and f[-4:] == ".inl" ]
if l:
print(' ', file=F)
for f in l:
print(' ', file=F)
print(' ', file=F)
print(' ', file=F)
print(' ', file=F)
if "mex" not in P["name"]:
print(f' ', file=F)
print(' ', file=F)
print('', end="", file=F)
def write_main_project14():
P = P_astra;
F = open(os.path.join("projects", P["file14"]), "w", encoding="utf-8")
write_project14_start(P, F)
for c in configs:
print(''' ''' % (c.name(), ), file=F)
print(' ..\\bin\\$(Platform)\\$(Configuration)\\', file=F)
print(' $(OutDir)obj\\', file=F)
print(' $(OutDir)obj\\', file=F)
print(' $(SolutionDir)bin\\$(Platform)\\$(Configuration)\\obj\\', file=F)
print(' .dll', file=F)
print(' ' + c.target() + '', file=F)
print(' true', file=F)
print(' ', file=F)
for c in configs:
print(''' ''' % (c.name(), ), file=F)
print(' ', file=F)
if c.debug:
print(' MultiThreadedDebugDLL', file=F)
else:
print(' MultiThreadedDLL', file=F)
print(' Level3', file=F)
print(' ..\\..\\..\\lib\\include;..\\..\\..\\include\\;%(AdditionalIncludeDirectories)', file=F)
print(' true', file=F)
if c.debug:
print(' Disabled', file=F)
else:
print(' MaxSpeed', file=F)
print(' true', file=F)
print(' true', file=F)
print(' AnySuitable', file=F)
print(' Speed', file=F)
d=' '
if c.cuda:
d+="ASTRA_CUDA;"
d+="__SSE2__;"
d+="DLL_EXPORTS;_CRT_SECURE_NO_WARNINGS;"
d+='%(PreprocessorDefinitions)'
print(d, file=F)
print(' true', file=F)
print(' true', file=F)
print(' stdcpp17', file=F)
print(' ', file=F)
print(' ', file=F)
print(' true', file=F)
if not c.debug:
print(' true', file=F)
print(' true', file=F)
print(' ..\\bin\\' + c.platform() + '\\' + c.config() + '\\' + c.target() + '.dll', file=F)
if c.cuda:
print(' cudart.lib;cufft.lib;%(AdditionalDependencies)', file=F)
l = ' ';
l += '%(AdditionalLibraryDirectories)'
if c.cuda:
l += ';$(CudaToolkitLibDir)'
l += ''
print(l, file=F)
print(' ', file=F)
if c.cuda:
print(' ', file=F)
print(' 64', file=F)
print(' true', file=F)
print(f' {CUDA_CC[(CUDA_MAJOR,CUDA_MINOR)]}', file=F)
print(' -std=c++17', file=F)
print(' /std:c++17', file=F)
print(' ', file=F)
print(' ', file=F)
write_project14_end(P, F)
F.close()
def write_mex_project14(P):
F = open(os.path.join("projects", P["name"] + "_vc14.vcxproj"), "w", encoding="utf-8")
write_project14_start(P, F)
print(' ', file=F)
print(' <_ProjectFileVersion>11.0.60610.1', file=F)
print(' ', file=F)
for c in configs:
print(''' ''' % (c.name(), ), file=F)
print(' ..\\bin\\$(Platform)\\$(Configuration)\\', file=F)
print(' $(OutDir)obj\\$(ProjectName)\\', file=F)
print(' $(ProjectName)_c', file=F)
print(' .mexw64', file=F)
print(' ', file=F)
for c in configs:
print(''' ''' % (c.name(), ), file=F)
print(' ', file=F)
if c.debug:
print(' MultiThreadedDebugDLL', file=F)
else:
print(' MultiThreadedDLL', file=F)
# print(' Level3', file=F)
#print(' $(MATLAB_ROOT)\\extern\\include\\;..\\..\\lib\\include;..\\..\\include;%(AdditionalIncludeDirectories)', file=F)
# FIXME: This CUDA_PATH shouldn't be necessary
print(' $(MATLAB_ROOT)\\extern\\include\\;$(CUDA_PATH)\\include;..\\..\\..\\lib\\include;..\\..\\..\\include;%(AdditionalIncludeDirectories)', file=F)
print(' true', file=F)
if c.debug:
print(' Disabled', file=F)
else:
print(' MaxSpeed', file=F)
# print(' true', file=F)
# print(' true', file=F)
# print(' AnySuitable', file=F)
# print(' Speed', file=F)
d=' '
if c.cuda:
d+="ASTRA_CUDA;"
d+="__SSE2__;"
d+="MATLAB_MEXCMD_RELEASE=700;"
# d+="DLL_EXPORTS;_CRT_SECURE_NO_WARNINGS;"
d+='%(PreprocessorDefinitions)'
print(d, file=F)
print(' stdcpp17', file=F)
print(' true', file=F)
# print(' true', file=F)
# if c.debug:
# EditAndContinue ??
print(' ', file=F)
print(' ', file=F)
# if not c.debug:
# print(' true', file=F)
# print(' true', file=F)
print(' $(OutDir)$(ProjectName)_c.mexw64', file=F)
print(' %s.lib;libmex.lib;libmx.lib;libut.lib;%%(AdditionalDependencies)' % (c.target(), ), file=F)
l = ' ';
l += '..\\bin\\x64\\'
l += c.config()
l += ';$(MATLAB_ROOT)\\extern\\lib\\win64\\microsoft'
l += ';%(AdditionalLibraryDirectories)'
l += ''
print(l, file=F)
print(' mex.def', file=F)
print(' true', file=F)
print(' ', file=F)
print(' ', file=F)
write_project14_end(P, F)
F.close()
def write_main_filters14():
P = P_astra
F = open(os.path.join("projects", P["name"] + ".vcxproj.filters"), "w", encoding="utf-8")
print(bom + '', file=F)
print('', file=F)
print(' ', file=F)
for Filter in P_astra["filter_names"]:
L = P_astra["filters"][Filter][1:]
l = [ f for f in L if len(f) > 3 and f[-3:] == ".cu" ]
for f in l:
print(' ', file=F)
print(' ' + Filter + '', file=F)
print(' ', file=F)
print(' ', file=F)
print(' ', file=F)
for Filter in P_astra["filter_names"]:
L = P_astra["filters"][Filter][1:]
l = [ f for f in L if len(f) > 4 and f[-4:] == ".cpp" ]
for f in l:
print(' ', file=F)
print(' ' + Filter + '', file=F)
print(' ', file=F)
print(' ', file=F)
print(' ', file=F)
for Filter in P_astra["filter_names"]:
L = P_astra["filters"][Filter][1:]
l = [ f for f in L if len(f) > 2 and f[-2:] == ".h" ]
for f in l:
print(' ', file=F)
print(' ' + Filter + '', file=F)
print(' ', file=F)
print(' ', file=F)
print(' ', file=F)
for Filter in P_astra["filter_names"]:
L = P_astra["filters"][Filter][1:]
l = [ f for f in L if len(f) > 4 and f[-4:] == ".inl" ]
for f in l:
print(' ', file=F)
print(' ' + Filter + '', file=F)
print(' ', file=F)
print(' ', file=F)
print(' ', file=F)
for f in P["filter_names"]:
print(' ', file=F)
print(' {' + P["filters"][f][0] + '}', file=F)
print(' ', file=F)
print(' ', file=F)
print('', end="", file=F)
F.close()
def parse_cuda_version(ver):
return [ int(x) for x in ver.split('.') ]
def check_cuda_version(ver):
try:
major, minor = parse_cuda_version(ver)
if major >= 9 and minor >= 0:
return True
except:
pass
return False
if (len(sys.argv) != 2) or not check_cuda_version(sys.argv[1]):
print("Usage: python gen.py [10.2|11.0|...]", file=sys.stderr)
sys.exit(1)
CUDA_MAJOR, CUDA_MINOR = parse_cuda_version(sys.argv[1])
try:
open("../../src/AstraObjectManager.cpp", "r")
except IOError:
print("Run gen.py from the build/msvc directory", file=sys.stderr)
sys.exit(1)
# Change directory to main dir
os.makedirs("projects", exist_ok=True)
write_sln()
write_main_project14()
write_main_filters14()
write_mex_project14(P0)
write_mex_project14(P1)
write_mex_project14(P2)
write_mex_project14(P3)
write_mex_project14(P4)
write_mex_project14(P5)
write_mex_project14(P6)
write_mex_project14(P7)
write_mex_project14(P8)
astra-toolbox-2.3.0/build/msvc/projects/ 0000775 0000000 0000000 00000000000 14756352071 0020224 5 ustar 00root root 0000000 0000000 astra-toolbox-2.3.0/build/msvc/projects/astra_mex_algorithm_vc14.vcxproj 0000664 0000000 0000000 00000023516 14756352071 0026536 0 ustar 00root root 0000000 0000000 
Debug_CUDAx64Debugx64Release_CUDAx64Releasex64astra_mex_algorithm{CE5EF874-830C-4C10-8651-CCA2A34ED9E4}astraMatlab10.0.22621.0DynamicLibraryv141DynamicLibraryv141DynamicLibraryv141DynamicLibraryv141
<_ProjectFileVersion>11.0.60610.1
..\bin\$(Platform)\$(Configuration)\$(OutDir)obj\$(ProjectName)\$(ProjectName)_c.mexw64..\bin\$(Platform)\$(Configuration)\$(OutDir)obj\$(ProjectName)\$(ProjectName)_c.mexw64..\bin\$(Platform)\$(Configuration)\$(OutDir)obj\$(ProjectName)\$(ProjectName)_c.mexw64..\bin\$(Platform)\$(Configuration)\$(OutDir)obj\$(ProjectName)\$(ProjectName)_c.mexw64MultiThreadedDebugDLL$(MATLAB_ROOT)\extern\include\;$(CUDA_PATH)\include;..\..\..\lib\include;..\..\..\include;%(AdditionalIncludeDirectories)trueDisabledASTRA_CUDA;__SSE2__;MATLAB_MEXCMD_RELEASE=700;%(PreprocessorDefinitions)stdcpp17true$(OutDir)$(ProjectName)_c.mexw64AstraCuda64D.lib;libmex.lib;libmx.lib;libut.lib;%(AdditionalDependencies)..\bin\x64\Debug_CUDA;$(MATLAB_ROOT)\extern\lib\win64\microsoft;%(AdditionalLibraryDirectories)mex.deftrueMultiThreadedDebugDLL$(MATLAB_ROOT)\extern\include\;$(CUDA_PATH)\include;..\..\..\lib\include;..\..\..\include;%(AdditionalIncludeDirectories)trueDisabled__SSE2__;MATLAB_MEXCMD_RELEASE=700;%(PreprocessorDefinitions)stdcpp17true$(OutDir)$(ProjectName)_c.mexw64Astra64D.lib;libmex.lib;libmx.lib;libut.lib;%(AdditionalDependencies)..\bin\x64\Debug;$(MATLAB_ROOT)\extern\lib\win64\microsoft;%(AdditionalLibraryDirectories)mex.deftrueMultiThreadedDLL$(MATLAB_ROOT)\extern\include\;$(CUDA_PATH)\include;..\..\..\lib\include;..\..\..\include;%(AdditionalIncludeDirectories)trueMaxSpeedASTRA_CUDA;__SSE2__;MATLAB_MEXCMD_RELEASE=700;%(PreprocessorDefinitions)stdcpp17true$(OutDir)$(ProjectName)_c.mexw64AstraCuda64.lib;libmex.lib;libmx.lib;libut.lib;%(AdditionalDependencies)..\bin\x64\Release_CUDA;$(MATLAB_ROOT)\extern\lib\win64\microsoft;%(AdditionalLibraryDirectories)mex.deftrueMultiThreadedDLL$(MATLAB_ROOT)\extern\include\;$(CUDA_PATH)\include;..\..\..\lib\include;..\..\..\include;%(AdditionalIncludeDirectories)trueMaxSpeed__SSE2__;MATLAB_MEXCMD_RELEASE=700;%(PreprocessorDefinitions)stdcpp17true$(OutDir)$(ProjectName)_c.mexw64Astra64.lib;libmex.lib;libmx.lib;libut.lib;%(AdditionalDependencies)..\bin\x64\Release;$(MATLAB_ROOT)\extern\lib\win64\microsoft;%(AdditionalLibraryDirectories)mex.deftrue