Skip to content

Commit

Permalink
Handle different versions of GMM++.
Browse files Browse the repository at this point in the history
  • Loading branch information
gogins committed Aug 29, 2018
1 parent 4720dd0 commit 34db044
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 54 deletions.
16 changes: 8 additions & 8 deletions Opcodes/linear_algebra.cpp
Expand Up @@ -3488,7 +3488,7 @@ class la_i_lu_factor_mr_t : public OpcodeBase<la_i_lu_factor_mr_t> {
la_i_mr_create_t *lhs;
la_i_vr_create_t *pivot;
la_i_mr_create_t *rhs;
#if !defined(GMM_VERSION)
#if defined(GMM_VERSION)
gmm::lapack_ipvt pivot__;
#else
std::vector<size_t> pivot__;
Expand All @@ -3503,7 +3503,7 @@ class la_i_lu_factor_mr_t : public OpcodeBase<la_i_lu_factor_mr_t> {
gmm::copy(rhs->mr, lhs->mr);
*isize = gmm::lu_factor(lhs->mr, pivot__);
for (size_t i = 0; i < pivot_size; ++i) {
#if !defined(GMM_VERSION)
#if defined(GMM_VERSION)
pivot->vr[i] = pivot__.get(i);
#else
pivot->vr[i] = pivot__[i];
Expand All @@ -3522,7 +3522,7 @@ class la_k_lu_factor_mr_t : public OpcodeBase<la_k_lu_factor_mr_t> {
la_i_mr_create_t *lhs;
la_i_vr_create_t *pivot;
la_i_mr_create_t *rhs;
#if !defined(GMM_VERSION)
#if defined(GMM_VERSION)
gmm::lapack_ipvt pivot__;
#else
std::vector<size_t> pivot__;
Expand All @@ -3540,7 +3540,7 @@ class la_k_lu_factor_mr_t : public OpcodeBase<la_k_lu_factor_mr_t> {
gmm::copy(rhs->mr, lhs->mr);
*ksize = gmm::lu_factor(lhs->mr, pivot__);
for (size_t i = 0; i < pivot_size; ++i) {
#if !defined(GMM_VERSION)
#if defined(GMM_VERSION)
pivot->vr[i] = pivot__.get(i);
#else
pivot->vr[i] = pivot__[i];
Expand All @@ -3559,7 +3559,7 @@ class la_i_lu_factor_mc_t : public OpcodeBase<la_i_lu_factor_mc_t> {
la_i_mc_create_t *lhs;
la_i_vr_create_t *pivot;
la_i_mc_create_t *rhs;
#if !defined(GMM_VERSION)
#if defined(GMM_VERSION)
gmm::lapack_ipvt pivot__;
#else
std::vector<size_t> pivot__;
Expand All @@ -3574,7 +3574,7 @@ class la_i_lu_factor_mc_t : public OpcodeBase<la_i_lu_factor_mc_t> {
gmm::copy(rhs->mc, lhs->mc);
*isize = gmm::lu_factor(lhs->mc, pivot__);
for (size_t i = 0; i < pivot_size; ++i) {
#if !defined(GMM_VERSION)
#if defined(GMM_VERSION)
pivot->vr[i] = pivot__.get(i);
#else
pivot->vr[i] = pivot__[i];
Expand All @@ -3593,7 +3593,7 @@ class la_k_lu_factor_mc_t : public OpcodeBase<la_k_lu_factor_mc_t> {
la_i_mc_create_t *lhs;
la_i_vr_create_t *pivot;
la_i_mc_create_t *rhs;
#if !defined(GMM_VERSION)
#if defined(GMM_VERSION)
gmm::lapack_ipvt pivot__;
#else
std::vector<size_t> pivot__;
Expand All @@ -3611,7 +3611,7 @@ class la_k_lu_factor_mc_t : public OpcodeBase<la_k_lu_factor_mc_t> {
gmm::copy(rhs->mc, lhs->mc);
*ksize = gmm::lu_factor(lhs->mc, pivot__);
for (size_t i = 0; i < pivot_size; ++i) {
#if !defined(GMM_VERSION)
#if defined(GMM_VERSION)
pivot->vr[i] = pivot__.get(i);
#else
pivot->vr[i] = pivot__[i];
Expand Down
1 change: 1 addition & 0 deletions cmake/Modules/FindGMM.cmake
@@ -1,6 +1,7 @@
# Try to find the GMM library.
# Once done this will define:
# GMM_FOUND - System has the GMM library.
# GMM_VERSION
# GMM_INCLUDE_DIRS - The GMM include directories.
# GMM_HAS_VECTOR_OSTREAM - Wether GMM defines operator<< for std::vector

Expand Down
91 changes: 45 additions & 46 deletions interfaces/csound.lisp
Expand Up @@ -29,51 +29,51 @@
; (cffi:foreign-string-alloc lisp-string))

(defpackage :csound
(:use :common-lisp :cffi :cm)
(:use :common-lisp :cffi)
(:export
#:csoundSetControlChannel
#:csoundInitialize
#:csoundCreate
#:csoundDestroy
#:csoundGetVersion
#:csoundGetAPIVersion
#:csoundCompileOrc
#:csoundEvalCode
#:csoundCompileArgs
#:csoundStart
#:csoundCompile
#:csoundCompileCsd
#:csoundCompileCsdText
#:csoundPerform
#:csoundPerformKsmps
#:csoundPerformBuffer
#:csoundStop
#:csoundCleanup
#:csoundReset
#:csoundGetSr
#:csoundGetKr
#:csoundGetKsmps
#:csoundGetNchnls
#:csoundGetNchnlsInput
#:csoundGet0dBFS
#:csoundGetCurrentTimeSamples
#:csoundGetSizeOfMYFLT
#:csoundGetHostData
#:csoundSetHostData
#:csoundSetOption
#:csoundGetOutputName
#:csoundSetOutput
#:csoundSetInput
#:csoundSetMIDIInput
#:csoundSetMIDIFileInput
#:csoundSetMIDIFileOutput
#:csoundSetRTAudioModule
#:csoundGetInputBufferSize
#:csoundGetOutputBufferSize
#:csoundGetInputBuffer
#:csoundGetOutputBuffer
#:csoundGetSpin
#:csoundReadScore
:csoundSetControlChannel
:csoundInitialize
:csoundCreate
:csoundDestroy
:csoundGetVersion
:csoundGetAPIVersion
:csoundCompileOrc
:csoundEvalCode
:csoundCompileArgs
:csoundStart
:csoundCompile
:csoundCompileCsd
:csoundCompileCsdText
:csoundPerform
:csoundPerformKsmps
:csoundPerformBuffer
:csoundStop
:csoundCleanup
:csoundReset
:csoundGetSr
:csoundGetKr
:csoundGetKsmps
:csoundGetNchnls
:csoundGetNchnlsInput
:csoundGet0dBFS
:csoundGetCurrentTimeSamples
:csoundGetSizeOfMYFLT
:csoundGetHostData
:csoundSetHostData
:csoundSetOption
:csoundGetOutputName
:csoundSetOutput
:csoundSetInput
:csoundSetMIDIInput
:csoundSetMIDIFileInput
:csoundSetMIDIFileOutput
:csoundSetRTAudioModule
:csoundGetInputBufferSize
:csoundGetOutputBufferSize
:csoundGetInputBuffer
:csoundGetOutputBuffer
:csoundGetSpin
:csoundReadScore
))
(cffi:define-foreign-library libcsound64
(:darwin "libcsound64.dylib")
Expand All @@ -82,7 +82,6 @@
(t (:default "libcsound64")))
(cffi:use-foreign-library libcsound64)
(in-package :csound)
(use-package :cm)

; You can paste below here new definitions including those created
; e.g. by SWIG. Be sure to TEST any changes you make to this file!
Expand Down Expand Up @@ -391,5 +390,5 @@
; (kopadr :pointer)
; (aopadr :pointer))

(set-dispatch-macro-character #\# #\> #'cl-heredoc:read-heredoc)


0 comments on commit 34db044

Please sign in to comment.