Skip to content

Commit

Permalink
Merge pull request #19 from kokkos/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
womeld authored Oct 21, 2019
2 parents 4bdc0ad + ce1487e commit 161a1fe
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 27 deletions.
12 changes: 6 additions & 6 deletions build/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -64,23 +64,23 @@ endif

all: libflcl.a

flcl-cxx.o: $(SRCDIR)/flcl-cxx.cc $(SRCDIR)/flcl-cxx.hpp
$(CXX) $(DEBUG) -I$(SRCDIR)/ $(KOKKOS_INC) -c $(SRCDIR)/flcl-cxx.cc
flcl-cxx.o: $(SRCDIR)/flcl-cxx.cpp $(SRCDIR)/flcl-cxx.hpp
$(CXX) $(DEBUG) -I$(SRCDIR)/ $(KOKKOS_INC) -c $(SRCDIR)/flcl-cxx.cpp

flcl-f.o: $(SRCDIR)/flcl-f.f90
$(FC) $(FSTD) $(DEBUG) -I$(SRCDIR)/ -c $(SRCDIR)/flcl-f.f90

flcl-util-cxx.o: $(SRCDIR)/flcl-util-cxx.cc $(SRCDIR)/flcl-util-cxx.h
$(CXX) $(DEBUG) -I$(SRCDIR)/ $(KOKKOS_INC) -c $(SRCDIR)/flcl-util-cxx.cc
flcl-util-cxx.o: $(SRCDIR)/flcl-util-cxx.cpp $(SRCDIR)/flcl-util-cxx.h
$(CXX) $(DEBUG) -I$(SRCDIR)/ $(KOKKOS_INC) -c $(SRCDIR)/flcl-util-cxx.cpp

flcl-util-f.o: $(SRCDIR)/flcl-util-f.f90 $(SRCDIR)/flcl-f.f90
$(FC) $(FSTD) $(DEBUG) -I$(SRCDIR)/ -c $(SRCDIR)/flcl-util-f.f90

libflcl.a: flcl-f.o flcl-cxx.o flcl-util-f.o flcl-util-cxx.o
ar rcs libflcl.a flcl-f.o flcl-cxx.o flcl-util-f.o flcl-util-cxx.o

test-flcl-cxx.o: $(TESTSRCDIR)/test-flcl-cxx.cc
$(CXX) $(DEBUG) -I$(SRCDIR) -I$(TESTSRCDIR)/ $(KOKKOS_INC) -c $(TESTSRCDIR)/test-flcl-cxx.cc
test-flcl-cxx.o: $(TESTSRCDIR)/test-flcl-cxx.cpp
$(CXX) $(DEBUG) -I$(SRCDIR) -I$(TESTSRCDIR)/ $(KOKKOS_INC) -c $(TESTSRCDIR)/test-flcl-cxx.cpp

test-flcl-f.o: flcl-f.o $(TESTSRCDIR)/test-flcl-f.f90
$(FC) $(FSTD) $(DEBUG) -I$(TESTSRCDIR)/ -c $(TESTSRCDIR)/test-flcl-f.f90
Expand Down
File renamed without changes.
File renamed without changes.
7 changes: 5 additions & 2 deletions test/test-flcl-cxx.cc → test/test-flcl-cxx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

#include "test-flcl-cxx.h"
#include <test-flcl-cxx.h>
#include <Kokkos_Core.hpp>
#include <flcl-cxx.hpp>
#include <iostream>

extern "C" {

Expand Down Expand Up @@ -1149,4 +1152,4 @@ extern "C" {
return c_sum;

}
}
}
34 changes: 22 additions & 12 deletions test/test-flcl-cxx.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,21 +38,31 @@
#ifndef TEST_FLCL_CXX_H
#define TEST_FLCL_CXX_H

#include <Kokkos_Core.hpp>
#include <flcl-cxx.hpp>
#include <iostream>
#include <stdbool.h>
#include <stdlib.h>

#ifdef __cplusplus
extern "C" {
#endif

size_t e0_length = 10;
size_t e1_length = 11;
size_t e2_length = 12;
size_t e3_length = 13;
size_t e4_length = 14;
size_t e5_length = 15;
size_t e6_length = 16;
size_t e1_length = 9;
size_t e2_length = 8;
size_t e3_length = 7;
size_t e4_length = 6;
size_t e5_length = 5;
size_t e6_length = 4;

#ifdef __cplusplus
bool logical_pre = true;
bool logical_post = false;
#else
_Bool logical_pre = true;
_Bool logical_post = false;
#endif

bool logical_pre = true;
bool logical_post = false;
#ifdef __cplusplus
} // extern "C"
#endif

#endif // TEST_FLCL_CXX_H
#endif // TEST_FLCL_CXX_H
14 changes: 7 additions & 7 deletions test/test-flcl-f.f90
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,12 @@ module test_flcl_f_mod
implicit none

integer(c_size_t), parameter :: e0_length = 10
integer(c_size_t), parameter :: e1_length = 11
integer(c_size_t), parameter :: e2_length = 12
integer(c_size_t), parameter :: e3_length = 13
integer(c_size_t), parameter :: e4_length = 14
integer(c_size_t), parameter :: e5_length = 15
integer(c_size_t), parameter :: e6_length = 16
integer(c_size_t), parameter :: e1_length = 9
integer(c_size_t), parameter :: e2_length = 8
integer(c_size_t), parameter :: e3_length = 7
integer(c_size_t), parameter :: e4_length = 6
integer(c_size_t), parameter :: e5_length = 5
integer(c_size_t), parameter :: e6_length = 4
logical(c_bool), parameter :: logical_pre = .true.
logical(c_bool), parameter :: logical_post = .false.

Expand Down Expand Up @@ -1980,4 +1980,4 @@ & function test_ndarray_r64_7d() &
end if
end function test_ndarray_r64_7d

end module test_flcl_f_mod
end module test_flcl_f_mod

0 comments on commit 161a1fe

Please sign in to comment.