Commit 5a915d5a authored by Patrick McCormick's avatar Patrick McCormick
Browse files

Cleanup and landing the realm target wrapper into the new kitsune lib layout.

parent 76f40f68
Loading
Loading
Loading
Loading
+18 −18
Original line number Diff line number Diff line
@@ -128,7 +128,7 @@ option(KITSUNE_ENABLE_REALM_TARGET
if (Realm_FOUND)
  message(STATUS "Realm runtime target enabled.")
  option(REALM_EXTRA_LINK_LIBS
    "Additional libraries needed by Realm backend runtime."
    "Additional libraries needed by Realm runtime target."
    "-ldl -lrt")
  add_subdirectory(lib/Realm)
endif()

kitsune/lib/CMakeLists.txt

deleted100644 → 0
+0 −0

Empty file deleted.

+2 −5
Original line number Diff line number Diff line
@@ -22,6 +22,3 @@ set_target_properties(kitcudart
  POSITION_INDEPENDENT_CODE   1
  COMPILE_FLAGS  "-fPIC"
)


+30 −0
Original line number Diff line number Diff line
# Copyright (c) 2020 Triad National Security, LLC
#                         All rights reserved.
#
# This file is part of the kitsune/llvm project.  It is released under
# the LLVM license.
#
#
# project (kitrealm)


# Realm uses RTTI -- shutdown LLVM's global configuration of enabling
# -fno-rtti...
set(LLVM_REQUIRES_RTTI 1)

include_directories(${KITSUNE_SOURCE_DIR}/include)
include_directories(${Realm_INCLUDE_DIR})

file(GLOB realm_srcs *.cpp)
file(GLOB realm_incs Realm/*.h)

add_kitsune_library(kitrealm
  ${realm_srcs}
  LINK_LIBS
  realm pthread dl rt)

set_target_properties(kitrealm
  PROPERTIES
  POSITION_INDEPENDENT_CODE   1
  COMPILE_FLAGS "-fPIC"
  )
+45 −0
Original line number Diff line number Diff line
/* Copyright 2018 Stanford University, NVIDIA Corporation
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

// C-only header for Realm - mostly includes typedefs right now,
//  but may be expanded to provide C bindings for the Realm API

#ifndef KITSUNE_REALM_C_H
#define KITSUNE_REALM_C_H

#include "realm/realm_c.h"

// for size_t
#include <stddef.h>

#ifdef __cplusplus
extern "C" {
#endif

typedef struct context context;
//context* getRealmCTX();
int realmInitRuntime(int argc, char** argv);
//NOTE: realmSpawn declared and defined in wrapper.cc
//int realmSpawn();
int realmSync();
size_t realmGetNumProcs();
//void* realmCreateRegion_int(int* data);
//void realmDestroyRegion(void *region);

#ifdef __cplusplus
}
#endif

#endif // ifndef KITSUNE_REALM_C_H
Loading