コード例 #1
0
ファイル: MixedContextWrapper.cs プロジェクト: zsybupt/FASTER
        public static MixedContextWrapper *MoveToContext(MixedContextWrapper *context)
        {
            var addr = (MixedContextWrapper *)
                       MallocFixedPageSize <MixedContextWrapper> .PhysicalInstance.Allocate();

            Copy(context, addr);
            return(addr);
        }
コード例 #2
0
        public static void FreeFromContext(MixedContextWrapper *c)
        {
#if BLIT_CONTEXT
            MallocFixedPageSize <MixedContextWrapper> .PhysicalInstance.FreeAtEpoch((long)c);
#else
            ((BlittableTypeWrapper *)&c)->Free <MixedContext>();
#endif
        }
コード例 #3
0
        public static ref MixedContext Convert(MixedContextWrapper *c)
        {
#if BLIT_CONTEXT && !GENERIC_BLIT_CONTEXT
            return(ref c->context);
#elif BLIT_CONTEXT && GENERIC_BLIT_CONTEXT
            return(ref Unsafe.AsRef <MixedContext>(c));
#else
            return(ref ((BlittableTypeWrapper *)&c)->GetObject <MixedContext>());
#endif
        }
コード例 #4
0
        public static void UpsertCompletionCallback(MixedKeyWrapper *key, MixedValueWrapper *value, MixedContextWrapper *ctx)
        {
            userFunctions.UpsertCompletionCallback(
                UserType.Convert(ctx));

            UserType.FreeFromContext(key);
            UserType.FreeFromContext(value);
            UserType.FreeFromContext(ctx);
        }
コード例 #5
0
        public static void ReadCompletionCallback(MixedKeyWrapper *key, MixedInputWrapper *input, MixedOutputWrapper *output, MixedContextWrapper *ctx, Status status)
        {
            userFunctions.ReadCompletionCallback(
                UserType.Convert(ctx),
                UserType.Convert(output), status);

            UserType.FreeFromContext(key);
            UserType.FreeFromContext(input);
            UserType.FreeFromContext(output);
            UserType.FreeFromContext(ctx);
        }
コード例 #6
0
ファイル: MixedContextWrapper.cs プロジェクト: zsybupt/FASTER
 public static void Copy(MixedContextWrapper *src, MixedContextWrapper *dst)
 {
     dst->context = src->context;
 }