forked from aseprite/aseprite
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaligned_memory.h
More file actions
27 lines (22 loc) · 840 Bytes
/
Copy pathaligned_memory.h
File metadata and controls
27 lines (22 loc) · 840 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// Aseprite Document Library
// Copyright (c) 2023 Igara Studio S.A.
//
// This file is released under the terms of the MIT license.
// Read LICENSE.txt for more information.
#ifndef DOC_ALIGNED_MEMORY_H_INCLUDED
#pragma once
#include "base/memory.h"
// Enable DOC_USE_ALIGNED_PIXELS in case that you want to start using
// SIMD optimizations. Probably more testing is required as the
// program was not well-suited for a rowstride > image width.
//#define DOC_USE_ALIGNED_PIXELS 1
#if DOC_USE_ALIGNED_PIXELS
#define doc_align_size(size) (base_align_size(size))
#define doc_aligned_alloc(size) base_aligned_alloc(size)
#define doc_aligned_free(ptr) base_aligned_free(ptr)
#else
#define doc_align_size(size) (size)
#define doc_aligned_alloc(size) malloc(size)
#define doc_aligned_free(ptr) free(ptr)
#endif
#endif