Exemple #1
0
        static Vector()
        {
            dataType = DataType <TDataType> .GetKind();

            executionSpace     = new TExecutionSpace();
            executionSpaceType = ExecutionSpace <TExecutionSpace> .GetKind();

            VectorUtilities <TDataType, TExecutionSpace> .Load();
        }
Exemple #2
0
        static NativeArray()
        {
            //if(!KokkosLibrary.IsInitialized())
            //{
            //    KokkosLibraryException.Throw("Kokkos Library is not initialized. Use ParallelProcessor.Initialize/Shutdown in the main routine/thread.");
            //}

            executionSpace = ExecutionSpace <TExecutionSpace> .GetKind();

            elementSize = sizeof(T);
        }
 public static void Free(ExecutionSpaceKind execution_space,
                         nint instance)
 {
     try
     {
         _free(execution_space, instance);
     }
     catch (Exception)
     {
         Console.WriteLine($"KokkosLibrary Free failed at 0x{instance:X} with {Enum.GetName(execution_space)}.");
     }
 }
 static SpatialMethods()
 {
     executionSpace = ExecutionSpace <TExecutionSpace> .GetKind();
 }
Exemple #5
0
 internal Complex(IntPtr intPtr, ExecutionSpaceKind executionSpace = ExecutionSpaceKind.Cuda)
 {
     pointer = new NativePointer(intPtr, ThisSize, false, executionSpace);
 }
Exemple #6
0
 public Complex(ExecutionSpaceKind executionSpace = ExecutionSpaceKind.Cuda)
 {
     pointer = NativePointer.Allocate(ThisSize, executionSpace);
 }
 static InterpolationMethods()
 {
     executionSpace = ExecutionSpace <TExecutionSpace> .GetKind();
 }
Exemple #8
0
 static CsvReader()
 {
     executionSpace = ExecutionSpace <TExecutionSpace> .GetKind();
 }
 static InterprocessMemory()
 {
     executionSpace     = new TExecutionSpace();
     executionSpaceType = ExecutionSpace <TExecutionSpace> .GetKind();
 }
Exemple #10
0
 static NativeString()
 {
     executionSpaceType = ExecutionSpace <TExecutionSpace> .GetKind();
 }